MDL-73305 mod_folder: Download Folder in a mlang formated folder

This commit is contained in:
Anastasios Bithas 2021-12-07 20:31:40 +02:00
parent ceb41588d2
commit 53682b209b

View File

@ -52,7 +52,8 @@ folder_downloaded($folder, $course, $cm, $context);
// Close the session.
\core\session\manager::write_close();
$filename = shorten_filename(clean_filename($folder->name . "-" . date("Ymd")) . ".zip");
$foldername = format_string($folder->name, true, ["context" => $context]);
$filename = shorten_filename(clean_filename($foldername . "-" . date("Ymd")) . ".zip");
$zipwriter = \core_files\archive_writer::get_stream_writer($filename, \core_files\archive_writer::ZIP_WRITER);
foreach ($files as $file) {