mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-38757 scorm: Reformat SCORM package module settings
This commit is contained in:
parent
b55248d5ad
commit
20b51a1134
2 changed files with 47 additions and 31 deletions
|
@ -52,6 +52,7 @@ $string['attemptstatusall'] = 'My home and entry page';
|
|||
$string['attemptstatusmy'] = 'My home only';
|
||||
$string['attemptstatusentry'] = 'Entry page only';
|
||||
$string['attemptsx'] = '{$a} attempts';
|
||||
$string['attemptsmanagement'] = 'Attempts management';
|
||||
$string['attempt1'] = '1 attempt';
|
||||
$string['attr_error'] = 'Bad value for attribute ({$a->attr}) in tag {$a->tag}.';
|
||||
$string['autocontinue'] = 'Auto-continue';
|
||||
|
@ -65,6 +66,7 @@ $string['browsed'] = 'Browsed';
|
|||
$string['browsemode'] = 'Preview mode';
|
||||
$string['browserepository'] = 'Browse repository';
|
||||
$string['cannotfindsco'] = 'Could not find SCO';
|
||||
$string['compatibilitysettings'] = 'Compatibility settings';
|
||||
$string['completed'] = 'Completed';
|
||||
$string['completionscorerequired'] = 'Require minimum score';
|
||||
$string['completionscorerequired_help'] = 'Enabling this setting will require a user to have at least the minimum score entered to be marked complete in this SCORM activity, as well as any other Activity Completion requirements.';
|
||||
|
@ -246,6 +248,7 @@ $string['package'] = 'Package file';
|
|||
$string['package_help'] = 'The package file is a zip (or pif) file containing SCORM/AICC course definition files.';
|
||||
$string['packagedir'] = 'Filesystem error: Can\'t create package directory';
|
||||
$string['packagefile'] = 'No package file specified';
|
||||
$string['packagehdr'] = 'Package';
|
||||
$string['packageurl'] = 'URL';
|
||||
$string['packageurl_help'] = 'This setting enables a URL for the SCORM package to be specified, rather than choosing a file via the file picker.';
|
||||
$string['passed'] = 'Passed';
|
||||
|
|
|
@ -48,6 +48,10 @@ class mod_scorm_mod_form extends moodleform_mod {
|
|||
// Summary
|
||||
$this->add_intro_editor(true);
|
||||
|
||||
// Package.
|
||||
$mform->addElement('header', 'packagehdr', get_string('packagehdr', 'scorm'));
|
||||
$mform->setExpanded('packagehdr', true);
|
||||
|
||||
// Scorm types
|
||||
$scormtypes = array(SCORM_TYPE_LOCAL => get_string('typelocal', 'scorm'));
|
||||
|
||||
|
@ -81,16 +85,27 @@ class mod_scorm_mod_form extends moodleform_mod {
|
|||
$mform->setType('scormtype', PARAM_ALPHA);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// New local package upload
|
||||
$mform->addElement('filepicker', 'packagefile', get_string('package', 'scorm'));
|
||||
$mform->addHelpButton('packagefile', 'package', 'scorm');
|
||||
$mform->disabledIf('packagefile', 'scormtype', 'noteq', SCORM_TYPE_LOCAL);
|
||||
|
||||
$mform->addElement('date_time_selector', 'timeopen', get_string("scormopen", "scorm"), array('optional' => true));
|
||||
$mform->addElement('date_time_selector', 'timeclose', get_string("scormclose", "scorm"), array('optional' => true));
|
||||
// Display Settings.
|
||||
$mform->addElement('header', 'displaysettings', get_string('appearance'));
|
||||
|
||||
// display Settings
|
||||
$mform->addElement('header', 'displaysettings', get_string('displaysettings', 'scorm'));
|
||||
// Framed / Popup Window
|
||||
$mform->addElement('select', 'popup', get_string('display', 'scorm'), scorm_get_popup_display_array());
|
||||
$mform->setDefault('popup', $cfg_scorm->popup);
|
||||
|
@ -157,9 +172,21 @@ class mod_scorm_mod_form extends moodleform_mod {
|
|||
$mform->setAdvanced('hidenav', $cfg_scorm->hidenav_adv);
|
||||
$mform->disabledIf('hidenav', 'hidetoc', 'noteq', 0);
|
||||
|
||||
// Display attempt status
|
||||
$mform->addElement('select', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm'), scorm_get_attemptstatus_array());
|
||||
$mform->addHelpButton('displayattemptstatus', 'displayattemptstatus', 'scorm');
|
||||
$mform->setDefault('displayattemptstatus', $cfg_scorm->displayattemptstatus);
|
||||
$mform->setAdvanced('displayattemptstatus', $cfg_scorm->displayattemptstatus_adv);
|
||||
|
||||
// Availability.
|
||||
$mform->addElement('header', 'availability', get_string('availability'));
|
||||
|
||||
$mform->addElement('date_time_selector', 'timeopen', get_string("scormopen", "scorm"), array('optional' => true));
|
||||
$mform->addElement('date_time_selector', 'timeclose', get_string("scormclose", "scorm"), array('optional' => true));
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// grade Settings
|
||||
$mform->addElement('header', 'gradesettings', get_string('gradesettings', 'scorm'));
|
||||
// Grade Settings.
|
||||
$mform->addElement('header', 'gradesettings', get_string('grade'));
|
||||
|
||||
// Grade Method
|
||||
$mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), scorm_get_grade_method_array());
|
||||
|
@ -176,7 +203,8 @@ class mod_scorm_mod_form extends moodleform_mod {
|
|||
$mform->disabledIf('maxgrade', 'grademethod', 'eq', GRADESCOES);
|
||||
$mform->setAdvanced('maxgrade', $cfg_scorm->maxgrade_adv);
|
||||
|
||||
$mform->addElement('header', 'othersettings', get_string('othersettings', 'scorm'));
|
||||
// Attempts management.
|
||||
$mform->addElement('header', 'attemptsmanagementhdr', get_string('attemptsmanagement', 'scorm'));
|
||||
|
||||
// Max Attempts
|
||||
$mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
|
||||
|
@ -191,18 +219,6 @@ class mod_scorm_mod_form extends moodleform_mod {
|
|||
$mform->setDefault('whatgrade', $cfg_scorm->whatgrade);
|
||||
$mform->setAdvanced('whatgrade', $cfg_scorm->whatgrade_adv);
|
||||
|
||||
// Display attempt status
|
||||
$mform->addElement('select', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm'), scorm_get_attemptstatus_array());
|
||||
$mform->addHelpButton('displayattemptstatus', 'displayattemptstatus', 'scorm');
|
||||
$mform->setDefault('displayattemptstatus', $cfg_scorm->displayattemptstatus);
|
||||
$mform->setAdvanced('displayattemptstatus', $cfg_scorm->displayattemptstatus_adv);
|
||||
|
||||
// Force completed
|
||||
$mform->addElement('selectyesno', 'forcecompleted', get_string('forcecompleted', 'scorm'));
|
||||
$mform->addHelpButton('forcecompleted', 'forcecompleted', 'scorm');
|
||||
$mform->setDefault('forcecompleted', $cfg_scorm->forcecompleted);
|
||||
$mform->setAdvanced('forcecompleted', $cfg_scorm->forcecompleted_adv);
|
||||
|
||||
// Force new attempt
|
||||
$mform->addElement('selectyesno', 'forcenewattempt', get_string('forcenewattempt', 'scorm'));
|
||||
$mform->addHelpButton('forcenewattempt', 'forcenewattempt', 'scorm');
|
||||
|
@ -215,24 +231,21 @@ class mod_scorm_mod_form extends moodleform_mod {
|
|||
$mform->setDefault('lastattemptlock', $cfg_scorm->lastattemptlock);
|
||||
$mform->setAdvanced('lastattemptlock', $cfg_scorm->lastattemptlock_adv);
|
||||
|
||||
// Compatibility settings.
|
||||
$mform->addElement('header', 'compatibilitysettingshdr', get_string('compatibilitysettings', 'scorm'));
|
||||
|
||||
// Force completed
|
||||
$mform->addElement('selectyesno', 'forcecompleted', get_string('forcecompleted', 'scorm'));
|
||||
$mform->addHelpButton('forcecompleted', 'forcecompleted', 'scorm');
|
||||
$mform->setDefault('forcecompleted', $cfg_scorm->forcecompleted);
|
||||
$mform->setAdvanced('forcecompleted', $cfg_scorm->forcecompleted_adv);
|
||||
|
||||
// Autocontinue
|
||||
$mform->addElement('selectyesno', 'auto', get_string('autocontinue', 'scorm'));
|
||||
$mform->addHelpButton('auto', 'autocontinue', 'scorm');
|
||||
$mform->setDefault('auto', $cfg_scorm->auto);
|
||||
$mform->setAdvanced('auto', $cfg_scorm->auto_adv);
|
||||
|
||||
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
|
||||
$mform->addElement('hidden', 'datadir', null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue