Merge branch 'MDL-27156_part2' of git://github.com/andyjdavis/moodle
authorDan Poltawski <dan@moodle.com>
Wed, 20 Jun 2012 08:38:13 +0000 (16:38 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 20 Jun 2012 08:38:13 +0000 (16:38 +0800)
lib/form/filepicker.php

index a27f015..58253bb 100644 (file)
@@ -76,7 +76,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input {
             $fpmaxbytes = $options['maxbytes'];
         }
         $coursemaxbytes = 0;
-        if (!empty($PAGE->course)) {
+        if (!empty($PAGE->course->maxbytes)) {
             $coursemaxbytes = $PAGE->course->maxbytes;
         }
         $this->_options['maxbytes'] = get_user_max_upload_file_size($PAGE->context, $CFG->maxbytes, $coursemaxbytes, $fpmaxbytes);