diff --git a/user/files.php b/user/files.php index d7043c588c8..9305cabe3ce 100644 --- a/user/files.php +++ b/user/files.php @@ -51,14 +51,16 @@ $PAGE->set_heading($title); $PAGE->set_pagelayout('mydashboard'); $PAGE->set_pagetype('user-files'); +$maxbytes = $CFG->userquota; $maxareabytes = $CFG->userquota; if (has_capability('moodle/user:ignoreuserquota', $context)) { + $maxbytes = USER_CAN_IGNORE_FILE_SIZE_LIMITS; $maxareabytes = FILE_AREA_MAX_BYTES_UNLIMITED; } $data = new stdClass(); $data->returnurl = $returnurl; -$options = array('subdirs' => 1, 'maxbytes' => $CFG->userquota, 'maxfiles' => -1, 'accepted_types' => '*', +$options = array('subdirs' => 1, 'maxbytes' => $maxbytes, 'maxfiles' => -1, 'accepted_types' => '*', 'areamaxbytes' => $maxareabytes); file_prepare_standard_filemanager($data, 'files', $options, $context, 'user', 'private', 0);