Merge branch 'MDL-69695' of https://github.com/paulholden/moodle into master

This commit is contained in:
Sara Arjona 2020-09-28 13:03:14 +02:00
commit b1a2dd1681

View File

@ -403,7 +403,7 @@ function folder_dndupload_handle($uploadinfo) {
function folder_get_coursemodule_info($cm) {
global $DB;
if (!($folder = $DB->get_record('folder', array('id' => $cm->instance),
'id, name, display, showexpanded, showdownloadfolder, intro, introformat'))) {
'id, name, display, showexpanded, showdownloadfolder, forcedownload, intro, introformat'))) {
return NULL;
}
$cminfo = new cached_cm_info();
@ -413,6 +413,7 @@ function folder_get_coursemodule_info($cm) {
$fdata = new stdClass();
$fdata->showexpanded = $folder->showexpanded;
$fdata->showdownloadfolder = $folder->showdownloadfolder;
$fdata->forcedownload = $folder->forcedownload;
if ($cm->showdescription && strlen(trim($folder->intro))) {
$fdata->intro = $folder->intro;
if ($folder->introformat != FORMAT_MOODLE) {