mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-58219 googledocs: Use google file extensions
Only rename on export for download. Part of MDL-58220
This commit is contained in:
parent
72643dc688
commit
af28b22892
3 changed files with 34 additions and 8 deletions
|
@ -278,6 +278,10 @@ switch ($action) {
|
|||
} else {
|
||||
// Download file to moodle.
|
||||
$downloadedfile = $repo->get_file($reference, $saveas_filename);
|
||||
|
||||
if (!empty($downloadedfile['newfilename'])) {
|
||||
$record->filename = $downloadedfile['newfilename'];
|
||||
}
|
||||
if (empty($downloadedfile['path'])) {
|
||||
$err->error = get_string('cannotdownload', 'repository');
|
||||
die(json_encode($err));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue