Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-35517_23' of git://github.com/stronk7/moodle into M…

…OODLE_23_STABLE
  • Loading branch information...
commit 1e112f8801a6c6cddb3336d697d450c656c84172 2 parents 3e8d7ca + 2974030
@samhemelryk samhemelryk authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 course/edit_form.php
View
6 course/edit_form.php
@@ -156,7 +156,11 @@ function definition() {
$mform->addHelpButton('showreports', 'showreports');
$mform->setDefault('showreports', $courseconfig->showreports);
- $choices = get_max_upload_sizes($CFG->maxbytes, 0, 0, $course->maxbytes);
+ // Handle non-existing $course->maxbytes on course creation.
+ $coursemaxbytes = !isset($course->maxbytes) ? null : $course->maxbytes;
+
+ // Let's prepare the maxbytes popup.
+ $choices = get_max_upload_sizes($CFG->maxbytes, 0, 0, $coursemaxbytes);
$mform->addElement('select', 'maxbytes', get_string('maximumupload'), $choices);
$mform->addHelpButton('maxbytes', 'maximumupload');
$mform->setDefault('maxbytes', $courseconfig->maxbytes);
Please sign in to comment.
Something went wrong with that request. Please try again.