Permalink
Browse files

Merge branch 'MDL-54830-34' of https://github.com/snake/moodle into M…

…OODLE_34_STABLE
  • Loading branch information...
dmonllao committed Jul 17, 2018
2 parents c650dd8 + 6a3aaf1 commit c0a2bba4e75d7aeeb9ddbdac6d858a824934bc7d
Showing with 5 additions and 1 deletion.
  1. +5 −1 course/externallib.php
@@ -933,7 +933,11 @@ public static function update_courses($courses) {
// Make sure maxbytes are less then CFG->maxbytes.
if (array_key_exists('maxbytes', $course)) {
$course['maxbytes'] = get_max_upload_file_size($CFG->maxbytes, $course['maxbytes']);
// We allow updates back to 0 max bytes, a special value denoting the course uses the site limit.
// Otherwise, either use the size specified, or cap at the max size for the course.
if ($course['maxbytes'] != 0) {
$course['maxbytes'] = get_max_upload_file_size($CFG->maxbytes, $course['maxbytes']);
}
}
if (!empty($course['courseformatoptions'])) {

0 comments on commit c0a2bba

Please sign in to comment.