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.
$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);
}