MDL-27156 repositories: altered a check as the !empty() test on $PAGE->course was always failing for some reason

This commit is contained in:
Andrew Davis
2012-06-20 15:17:12 +07:00
parent bc8da017b5
commit 703ffaea05
+1 -1
View 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);