]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16722 - Upload limit does not respect course upload limit in settings for mod...
authorpiers <piers>
Mon, 29 Sep 2008 00:35:28 +0000 (00:35 +0000)
committerpiers <piers>
Mon, 29 Sep 2008 00:35:28 +0000 (00:35 +0000)
mod/scorm/mod_form.php

index 48a45f04a05bd5abeae128abbfd420737448e1c5..b5556e84eff13581495631837699b07e2a162a33 100644 (file)
@@ -5,7 +5,7 @@ require_once($CFG->dirroot.'/mod/scorm/locallib.php');
 class mod_scorm_mod_form extends moodleform_mod {
 
     function definition() {
-        global $CFG;
+        global $CFG, $COURSE;
 
         $mform = $this->_form;
 
@@ -67,6 +67,8 @@ class mod_scorm_mod_form extends moodleform_mod {
         }
 
 // 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);