diff --git a/mod/data/field/file/mod.html b/mod/data/field/file/mod.html index 73815b5abbe..7a67a1694d6 100644 --- a/mod/data/field/file/mod.html +++ b/mod/data/field/file/mod.html @@ -12,7 +12,7 @@ maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course)); + $course = $DB->get_record('course', array('id'=>$this->data->course)); $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes); echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id' => 'param3')); ?> diff --git a/mod/data/field/picture/mod.html b/mod/data/field/picture/mod.html index 9dd1583f6b3..4b32474bbe7 100644 --- a/mod/data/field/picture/mod.html +++ b/mod/data/field/picture/mod.html @@ -44,7 +44,7 @@ maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course)); + $course = $DB->get_record('course', array('id'=>$this->data->course)); $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes); echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id'=>'param3')); ?>