From a4b9f21e45a9dd3bdaf3c6918c0d30f54844bced Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 15 Jun 2012 19:32:39 +0200 Subject: [PATCH] MDL-27156 maxfilesize: Comment out new cap use + return -1 as temp fix With the capability check and the return -1 commented it has been checked here that it's possible to upload and pick from filesystem repository files normally, so I'm introducing this temp commit to allow people to use those repos "normallly" until a proper fix arrives supporting the new cap. --- lib/moodlelib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 708c613c8b3..6978a424b7c 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -5860,9 +5860,10 @@ function get_user_max_upload_file_size($context, $sitebytes=0, $coursebytes=0, $ $user = $USER; } - if (has_capability('moodle/course:ignorefilesizelimits', $context, $user)) { - return -1; - } + // Temp. commenting this until MDL-27156 fixes it! + // if (has_capability('moodle/course:ignorefilesizelimits', $context, $user)) { + // return -1; + // } return get_max_upload_file_size($sitebytes, $coursebytes, $modulebytes); }