From 136e05a7ff8860f7146b5ee0b098666d9bf6a831 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Mon, 29 Dec 2014 12:11:52 +0000 Subject: [PATCH] MDL-43198 folder: respect ignorefilesizelimits permission Thanks to Miryan Salas for the patch. --- mod/folder/edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/folder/edit.php b/mod/folder/edit.php index 666e3fe080c..1d40e4bde55 100644 --- a/mod/folder/edit.php +++ b/mod/folder/edit.php @@ -45,7 +45,8 @@ $PAGE->set_activity_record($folder); $data = new stdClass(); $data->id = $cm->id; -$options = array('subdirs'=>1, 'maxbytes'=>$CFG->maxbytes, 'maxfiles'=>-1, 'accepted_types'=>'*'); +$maxbytes = get_user_max_upload_file_size($context, $CFG->maxbytes); +$options = array('subdirs' => 1, 'maxbytes' => $maxbytes, 'maxfiles' => -1, 'accepted_types' => '*'); file_prepare_standard_filemanager($data, 'files', $options, $context, 'mod_folder', 'content', 0); $mform = new mod_folder_edit_form(null, array('data'=>$data, 'options'=>$options));