From 560417ffa20f7e69523ac804e9a7171a0be1f68e Mon Sep 17 00:00:00 2001 From: piers Date: Mon, 29 Sep 2008 00:35:28 +0000 Subject: [PATCH] MDL-16722 - Upload limit does not respect course upload limit in settings for mod/scorm. --- mod/scorm/mod_form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/scorm/mod_form.php b/mod/scorm/mod_form.php index 48a45f04a05bd..b5556e84eff13 100644 --- a/mod/scorm/mod_form.php +++ b/mod/scorm/mod_form.php @@ -5,7 +5,7 @@ class mod_scorm_mod_form extends moodleform_mod { function definition() { - global $CFG; + global $CFG, $COURSE; $mform = $this->_form; @@ -67,6 +67,8 @@ function definition() { } // New local package upload + $maxbytes = get_max_upload_file_size($CFG->maxbytes, $COURSE->maxbytes); + $mform->setMaxFileSize($maxbytes); $mform->addElement('file', 'packagefile', get_string('package','scorm')); $mform->disabledIf('packagefile', 'scormtype', 'noteq', SCORM_TYPE_LOCAL);