Skip to content

Commit

Permalink
Merge branch 'MDL-35517_23' of git://github.com/stronk7/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_23_STABLE
  • Loading branch information
Sam Hemelryk committed Sep 24, 2012
2 parents 3e8d7ca + 2974030 commit 1e112f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion course/edit_form.php
Expand Up @@ -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);
Expand Down

0 comments on commit 1e112f8

Please sign in to comment.