Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master_MDL-38715' of git://github.com/danmarsden/moodle
  • Loading branch information
danpoltawski committed Apr 2, 2013
2 parents 2188a69 + 1de23b7 commit 899fd93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mod/scorm/mod_form.php
Expand Up @@ -69,18 +69,18 @@ function definition() {
// Reference
if (count($scormtypes) > 1) {
$mform->addElement('select', 'scormtype', get_string('scormtype', 'scorm'), $scormtypes);
$mform->setType('scormtype', PARAM_ALPHA);
$mform->addHelpButton('scormtype', 'scormtype', 'scorm');
$mform->addElement('text', 'packageurl', get_string('packageurl', 'scorm'), array('size'=>60));
$mform->setType('packageurl', PARAM_RAW);
$mform->addHelpButton('packageurl', 'packageurl', 'scorm');
$mform->disabledIf('packageurl', 'scormtype', 'eq', SCORM_TYPE_LOCAL);
} else {
$mform->addElement('hidden', 'scormtype', SCORM_TYPE_LOCAL);
$mform->setType('scormtype', PARAM_ALPHA);
}

// New local package upload
$maxbytes = get_max_upload_file_size($CFG->maxbytes, $COURSE->maxbytes);
$mform->setMaxFileSize($maxbytes);
$mform->addElement('filepicker', 'packagefile', get_string('package', 'scorm'));
$mform->addHelpButton('packagefile', 'package', 'scorm');
$mform->disabledIf('packagefile', 'scormtype', 'noteq', SCORM_TYPE_LOCAL);
Expand Down Expand Up @@ -243,12 +243,14 @@ function definition() {
if (count($scormtypes) > 1) {
// Update packages timing
$mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), scorm_get_updatefreq_array());
$mform->setType('updatefreq', PARAM_INT);
$mform->setDefault('updatefreq', $cfg_scorm->updatefreq);
$mform->setAdvanced('updatefreq', $cfg_scorm->updatefreq_adv);
$mform->addHelpButton('updatefreq', 'updatefreq', 'scorm');
$mform->disabledIf('updatefreq', 'scormtype', 'eq', SCORM_TYPE_LOCAL);
} else {
$mform->addElement('hidden', 'updatefreq', 0);
$mform->setType('updatefreq', PARAM_INT);
}
//-------------------------------------------------------------------------------
// Hidden Settings
Expand Down

0 comments on commit 899fd93

Please sign in to comment.