Index: lang/en_utf8/scorm.php =================================================================== RCS file: /cvsroot/moodle/moodle/lang/en_utf8/scorm.php,v retrieving revision 1.32 diff -u -r1.32 scorm.php --- lang/en_utf8/scorm.php 24 Sep 2008 07:01:32 -0000 1.32 +++ lang/en_utf8/scorm.php 7 Oct 2008 04:58:02 -0000 @@ -20,6 +20,7 @@ $string['attemptsx'] = '$a attempts'; $string['attr_error'] = 'Bad value for attribute ($a->attr) in tag $a->tag.'; $string['autocontinue'] = 'Auto-Continue'; +$string['autocontinuedesc'] = 'This preferences sets the default auto continue for the activity'; $string['averageattempt'] = 'Average attempts'; $string['badmanifest'] = 'Some manifest errors: see errors log'; $string['badpackage'] = 'The specified package/manifest is not valid. Check it and try again.'; @@ -39,9 +40,12 @@ $string['details'] = 'Track details'; $string['directories'] = 'Show the directory links'; $string['display'] = 'Display package'; +$string['displaydesc'] = 'This preference set the default of whether to display the package or not for an activity'; $string['domxml'] = 'DOMXML external library'; $string['displayattemptstatus'] = 'Display attempt status'; +$string['displayattemptstatusdesc'] = 'This preference set the default value for the display attempt status setting'; $string['displaycoursestructure'] = 'Display course structure'; +$string['displaycoursestructuredesc'] = 'This preference set the default value for the display course structure setting'; $string['element'] = 'Element'; $string['entercourse'] = 'Enter course'; $string['enter'] = 'Enter'; @@ -61,20 +65,25 @@ $string['fullscreen'] = 'Fill the whole screen'; $string['general'] = 'General data'; $string['forcenewattempt'] = 'Force new attempt'; +$string['forcenewattemptdesc'] = 'This preference set the default value for the force new attempt setting'; $string['forcecompleted'] = 'Force completed'; +$string['forcecompleteddesc'] = 'This preference set the default value for the force completed setting'; $string['gradeaverage'] = 'Average grade'; $string['gradehighest'] = 'Highest grade'; $string['grademethod'] = 'Grading method'; -$string['gradereported'] = 'Grade reported'; +$string['grademethoddesc'] = 'This preferences sets the default grade method for an activity'; $string['gradescoes'] = 'Learning Objects'; $string['gradesum'] = 'Sum grade'; $string['height'] = 'Height'; $string['hidden'] = 'Hidden'; $string['hidebrowse'] = 'Disable preview mode'; +$string['hidebrowsedesc'] = 'This preferences sets the default or whether to disable or enable the preview mode'; $string['hideexit'] = 'Hide exit link'; $string['hidenav'] = 'Hide navigation buttons'; +$string['hidenavdesc'] = 'This preferences sets the default or whether to show or hide the navigation buttons'; $string['hidereview'] = 'Hide review button'; $string['hidetoc'] = 'Course structure display (TOC)'; +$string['hidetocdesc'] = 'This preferences sets the default for whether to show or hide the course structure display (TOC)'; $string['highestattempt'] = 'Highest attempt'; $string['identifier'] = 'Question Identifier'; $string['iframe'] = 'Current window'; @@ -86,9 +95,12 @@ $string['lastaccess'] = 'Last access'; $string['lastattempt'] = 'Last attempt'; $string['lastattemptlock'] = 'Lock after final attempt'; +$string['lastattemptlockdesc'] = 'This preference set the default value for the lock after final attempt setting'; $string['location'] = 'Show the location bar'; $string['max'] = 'Max score'; $string['maximumattempts'] = 'Number of attempts'; +$string['maximumattemptsdesc'] = 'This preferences sets the default number of maximum attempts for an activity'; +$string['maximumgradedesc'] = 'This preferences sets the default maximum grade for an activity'; $string['menubar'] = 'Show the menu bar'; $string['min'] = 'Min score'; $string['missing_attribute'] = 'Missing attribute $a->attr in tag $a->tag'; @@ -120,6 +132,8 @@ $string['passed'] = 'Passed'; $string['php5'] = 'PHP 5 (DOMXML native library)'; $string['popup'] = 'New window'; +$string['popupblocked'] = 'If a new windows doesn\'t apprear click $a to open a new window'; +$string['popupblockedlinkname'] = 'here'; $string['popupmenu'] = 'In a drop down menu'; $string['popupopen'] = 'Open package in a new window'; $string['position_error'] = 'The $a->tag tag can\'t be child of $a->parent tag'; @@ -143,6 +157,7 @@ $string['scrollbars'] = 'Allow the window to be scrolled'; $string['sided'] = 'On the left side'; $string['skipview'] = 'Student skip content structure page'; +$string['skipviewdesc'] = 'This preferences sets the default of when to skip content structure for a page'; $string['slashargs'] = 'WARNING: slash arguments is disabled on this site and objects may not function as expected!'; $string['stagesize'] = 'Stage size'; $string['started'] = 'Started on'; @@ -174,10 +189,12 @@ $string['viewallreports'] = 'View reports for $a attempts'; $string['viewalluserreports'] = 'View reports for $a users'; $string['whatgrade'] = 'Attempts grading'; +$string['whatgradedesc'] = 'This preferences sets the default attempts grading'; $string['width'] = 'Width'; $string['window'] = 'Window'; $string['unziperror'] = 'An error occurs during package unzip'; $string['othersettings'] = 'Additional settings'; +$string['updatefreqdesc'] = 'This preferences sets the default auto-update frequency of an activity'; $string['updatefreq'] = 'Auto-update frequency'; $string['options'] = 'Options'; $string['activityloading'] = "You will be automatically redirected to the activity in"; // used in conjunction with numseconds Index: mod/scorm/locallib.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/scorm/locallib.php,v retrieving revision 1.77 diff -u -r1.77 locallib.php --- mod/scorm/locallib.php 25 Sep 2008 23:59:32 -0000 1.77 +++ mod/scorm/locallib.php 13 Oct 2008 18:01:23 -0000 @@ -22,10 +22,108 @@ define('FIRSTATTEMPT', '2'); define('LASTATTEMPT', '3'); - /// Local Library of functions for module scorm /** + * Returns an array of the popup options for SCORM and each options default value + * + * @return array an array of popup options as the key and their defaults as the value + */ +function scorm_get_popup_options_array(){ + global $CFG; + return array('resizable'=> $CFG->scorm_resizable, + 'scrollbars'=> $CFG->scorm_scrollbars, + 'directories'=> $CFG->scorm_directories, + 'location'=> $CFG->scorm_location, + 'menubar'=> $CFG->scorm_menubar, + 'toolbar'=> $CFG->scorm_toolbar, + 'status'=> $CFG->scorm_status); +} + +/** + * Returns an array of the array of what grade options + * + * @return array an array of what grade options + */ +function scorm_get_grade_method_array(){ + return array (GRADESCOES => get_string('gradescoes', 'scorm'), + GRADEHIGHEST => get_string('gradehighest', 'scorm'), + GRADEAVERAGE => get_string('gradeaverage', 'scorm'), + GRADESUM => get_string('gradesum', 'scorm')); +} + +/** + * Returns an array of the array of what grade options + * + * @return array an array of what grade options + */ +function scorm_get_what_grade_array(){ + return array (HIGHESTATTEMPT => get_string('highestattempt', 'scorm'), + AVERAGEATTEMPT => get_string('averageattempt', 'scorm'), + FIRSTATTEMPT => get_string('firstattempt', 'scorm'), + LASTATTEMPT => get_string('lastattempt', 'scorm')); +} + +/** + * Returns an array of the array of skip view options + * + * @return array an array of skip view options + */ +function scorm_get_skip_view_array(){ + return array(0 => get_string('never'), + 1 => get_string('firstaccess','scorm'), + 2 => get_string('always')); +} + +/** + * Returns an array of the array of hide table of contents options + * + * @return array an array of hide table of contents options + */ +function scorm_get_hidetoc_array(){ + return array(0 =>get_string('sided','scorm'), + 1 => get_string('hidden','scorm'), + 2 => get_string('popupmenu','scorm')); +} + +/** + * Returns an array of the array of update frequency options + * + * @return array an array of update frequency options + */ +function scorm_get_updatefreq_array(){ + return array(0 => get_string('never'), + 1 => get_string('onchanges','scorm'), + 2 => get_string('everyday','scorm'), + 3 => get_string('everytime','scorm')); +} + +/** + * Returns an array of the array of popup display options + * + * @return array an array of popup display options + */ +function scorm_get_popup_display_array(){ + return array(0 => get_string('iframe', 'scorm'), + 1 => get_string('popup', 'scorm')); +} + +/** + * Returns an array of the array of attempt options + * + * @return array an array of attempt options + */ +function scorm_get_attempts_array(){ + $attempts = array(0 => get_string('nolimit','scorm'), + 1 => get_string('attempt1','scorm')); + + for ($i=2; $i<=6; $i++) { + $attempts[$i] = get_string('attemptsx','scorm', $i); + } + + return $attempts; +} +/** * Extracts scrom package, sets up all variables. * Called whenever scorm changes * @param object $scorm instance - fields are updated and changes saved into database Index: mod/scorm/mod_form.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/scorm/mod_form.php,v retrieving revision 1.22 diff -u -r1.22 mod_form.php --- mod/scorm/mod_form.php 29 Sep 2008 00:35:28 -0000 1.22 +++ mod/scorm/mod_form.php 13 Oct 2008 18:07:28 -0000 @@ -9,17 +9,6 @@ $mform = $this->_form; - $SCORM_GRADE_METHOD = array (GRADESCOES => get_string('gradescoes', 'scorm'), - GRADEHIGHEST => get_string('gradehighest', 'scorm'), - GRADEAVERAGE => get_string('gradeaverage', 'scorm'), - GRADESUM => get_string('gradesum', 'scorm')); - - $SCORM_WHAT_GRADE = array (HIGHESTATTEMPT => get_string('highestattempt', 'scorm'), - AVERAGEATTEMPT => get_string('averageattempt', 'scorm'), - FIRSTATTEMPT => get_string('firstattempt', 'scorm'), - LASTATTEMPT => get_string('lastattempt', 'scorm')); - - if (!$CFG->slasharguments) { $mform->addElement('static', '', '',notify(get_string('slashargs', 'scorm'), 'notifyproblem', 'center', true)); } @@ -77,67 +66,59 @@ $mform->addElement('header', 'advanced', get_string('othersettings', 'form')); // Grade Method - $mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), $SCORM_GRADE_METHOD); + $mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), scorm_get_grade_method_array()); $mform->setHelpButton('grademethod', array('grademethod', get_string('grademethod', 'scorm'),'scorm')); - $mform->setDefault('grademethod', 0); + $mform->setDefault('grademethod', $CFG->scorm_grademethod); // Maximum Grade for ($i=0; $i<=100; $i++) { $grades[$i] = "$i"; } $mform->addElement('select', 'maxgrade', get_string('maximumgrade'), $grades); - $mform->setDefault('maxgrade', 0); + $mform->setDefault('maxgrade', $CFG->scorm_maxgrade); $mform->disabledIf('maxgrade', 'grademethod','eq', GRADESCOES); // Attempts $mform->addElement('static', '', '' ,'
'); // Max Attempts - $attempts = array(0 => get_string('nolimit','scorm')); - for ($i=1; $i<=$CFG->scorm_maxattempts; $i++) { - if ($i == 1) { - $attempts[$i] = get_string('attempt1','scorm'); - } else { - $attempts[$i] = get_string('attemptsx','scorm', $i); - } - } - $mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), $attempts); + $mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array()); $mform->setHelpButton('maxattempt', array('maxattempt',get_string('maximumattempts', 'scorm'), 'scorm')); - $mform->setDefault('maxattempt', 1); + $mform->setDefault('maxattempt', $CFG->scorm_maxattempts); // Display attempt status $mform->addElement('selectyesno', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm')); $mform->setHelpButton('displayattemptstatus', array('displayattemptstatus',get_string('displayattemptstatus', 'scorm'), 'scorm')); - $mform->setDefault('displayattemptstatus', 1); + $mform->setDefault('displayattemptstatus', $CFG->scorm_displayattemptstatus); // Display course structure $mform->addElement('selectyesno', 'displaycoursestructure', get_string('displaycoursestructure', 'scorm')); $mform->setHelpButton('displaycoursestructure', array('displaycoursestructure',get_string('displaycoursestructure', 'scorm'), 'scorm')); - $mform->setDefault('displaycoursestructure', 1); + $mform->setDefault('displaycoursestructure', $CFG->scorm_displaycoursestructure); // Force completed $mform->addElement('selectyesno', 'forcecompleted', get_string('forcecompleted', 'scorm')); $mform->setHelpButton('forcecompleted', array('forcecompleted',get_string('forcecompleted', 'scorm'), 'scorm')); - $mform->setDefault('forcecompleted', 0); + $mform->setDefault('forcecompleted', $CFG->scorm_forcecompleted); $mform->setAdvanced('forcecompleted'); // Force new attempt $mform->addElement('selectyesno', 'forcenewattempt', get_string('forcenewattempt', 'scorm')); $mform->setHelpButton('forcenewattempt', array('forcenewattempt',get_string('forcenewattempt', 'scorm'), 'scorm')); - $mform->setDefault('forcenewattempt', 0); + $mform->setDefault('forcenewattempt', $CFG->scorm_forcenewattempt); $mform->setAdvanced('forcenewattempt'); // Last attempt lock - lock the enter button after the last available attempt has been made $mform->addElement('selectyesno', 'lastattemptlock', get_string('lastattemptlock', 'scorm')); $mform->setHelpButton('lastattemptlock', array('lastattemptlock',get_string('lastattemptlock', 'scorm'), 'scorm')); - $mform->setDefault('lastattemptlock', 0); + $mform->setDefault('lastattemptlock', $CFG->scorm_lastattemptlock); $mform->setAdvanced('lastattemptlock'); // What Grade - $mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), $SCORM_WHAT_GRADE); + $mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), scorm_get_what_grade_array()); $mform->disabledIf('whatgrade', 'maxattempt','eq',1); $mform->setHelpButton('whatgrade', array('whatgrade',get_string('whatgrade', 'scorm'), 'scorm')); - $mform->setDefault('whatgrade', 0); + $mform->setDefault('whatgrade', $CFG->scorm_whatgrade); $mform->setAdvanced('whatgrade'); // Activation period @@ -174,77 +155,51 @@ $mform->setType('height', PARAM_INT); // Framed / Popup Window - $options = array(); - $options[0] = get_string('iframe', 'scorm'); - $options[1] = get_string('popup', 'scorm'); - $mform->addElement('select', 'popup', get_string('display', 'scorm'), $options); - $mform->setDefault('popup', 0); + $mform->addElement('select', 'popup', get_string('display', 'scorm'), scorm_get_popup_display_array()); + $mform->setDefault('popup', $CFG->scorm_popup); $mform->setAdvanced('popup'); // Window Options $winoptgrp = array(); - $winoptgrp[] = &$mform->createElement('checkbox', 'resizable', '', get_string('resizable', 'scorm')); - $winoptgrp[] = &$mform->createElement('checkbox', 'scrollbars', '', get_string('scrollbars', 'scorm')); - $winoptgrp[] = &$mform->createElement('checkbox', 'directories', '', get_string('directories', 'scorm')); - $winoptgrp[] = &$mform->createElement('checkbox', 'location', '', get_string('location', 'scorm')); - $winoptgrp[] = &$mform->createElement('checkbox', 'menubar', '', get_string('menubar', 'scorm')); - $winoptgrp[] = &$mform->createElement('checkbox', 'toolbar', '', get_string('toolbar', 'scorm')); - $winoptgrp[] = &$mform->createElement('checkbox', 'status', '', get_string('status', 'scorm')); + foreach(scorm_get_popup_options_array() as $key => $value){ + $winoptgrp[] = &$mform->createElement('checkbox', $key, '', get_string($key, 'scorm')); + $mform->setDefault($key, $value); + } $mform->addGroup($winoptgrp, 'winoptgrp', get_string('options','scorm'), '
', false); - $mform->setDefault('resizable', 1); - $mform->setDefault('scrollbars', 1); - $mform->setDefault('directories', 0); - $mform->setDefault('location', 0); - $mform->setDefault('menubar', 0); - $mform->setDefault('toolbar', 0); - $mform->setDefault('status', 0); $mform->setAdvanced('winoptgrp'); $mform->disabledIf('winoptgrp', 'popup', 'eq', 0); // Skip view page - $options = array(); - $options[0]=get_string('never'); - $options[1]=get_string('firstaccess','scorm'); - $options[2]=get_string('always'); - $mform->addElement('select', 'skipview', get_string('skipview', 'scorm'), $options); + $mform->addElement('select', 'skipview', get_string('skipview', 'scorm'),scorm_get_skip_view_array()); $mform->setHelpButton('skipview', array('skipview',get_string('skipview', 'scorm'), 'scorm')); - $mform->setDefault('skipview', 1); + $mform->setDefault('skipview', $CFG->scorm_skipview); $mform->setAdvanced('skipview'); // Hide Browse $mform->addElement('selectyesno', 'hidebrowse', get_string('hidebrowse', 'scorm')); $mform->setHelpButton('hidebrowse', array('hidebrowse',get_string('hidebrowse', 'scorm'), 'scorm')); - $mform->setDefault('hidebrowse', 0); + $mform->setDefault('hidebrowse', $CFG->scorm_hidebrowse); $mform->setAdvanced('hidebrowse'); // Toc display - $options = array(); - $options[1]=get_string('hidden','scorm'); - $options[0]=get_string('sided','scorm'); - $options[2]=get_string('popupmenu','scorm'); - $mform->addElement('select', 'hidetoc', get_string('hidetoc', 'scorm'), $options); - $mform->setDefault('hidetoc', 0); + $mform->addElement('select', 'hidetoc', get_string('hidetoc', 'scorm'), scorm_get_hidetoc_array()); + $mform->setDefault('hidetoc', $CFG->scorm_hidetoc); $mform->setAdvanced('hidetoc'); // Hide Navigation panel $mform->addElement('selectyesno', 'hidenav', get_string('hidenav', 'scorm')); - $mform->setDefault('hidenav', 0); + $mform->setDefault('hidenav', $CFG->scorm_hidenav); $mform->setAdvanced('hidenav'); // Autocontinue $mform->addElement('selectyesno', 'auto', get_string('autocontinue', 'scorm')); $mform->setHelpButton('auto', array('autocontinue',get_string('autocontinue', 'scorm'), 'scorm')); - $mform->setDefault('auto', 0); + $mform->setDefault('auto', $CFG->scorm_auto); $mform->setAdvanced('auto'); // Update packages timing - $options = array(); - $options[0]=get_string('never'); - // $options[1]=get_string('onchanges','scorm'); - nolonger required, but dont change the sequence - $options[2]=get_string('everyday','scorm'); - $options[3]=get_string('everytime','scorm'); - $mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), $options); - $mform->setDefault('updatefreq', 0); + $mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), scorm_get_updatefreq_array()); + $mform->setDefault('updatefreq', $CFG->scorm_updatefreq); $mform->setAdvanced('updatefreq'); //------------------------------------------------------------------------------- @@ -268,7 +223,7 @@ } - function defaults_preprocessing(&$default_values) { + function data_preprocessing(&$default_values) { global $COURSE; if (isset($default_values['popup']) && ($default_values['popup'] == 1) && isset($default_values['options'])) { Index: mod/scorm/player.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/scorm/player.php,v retrieving revision 1.46 diff -u -r1.46 player.php --- mod/scorm/player.php 12 Aug 2008 01:26:10 -0000 1.46 +++ mod/scorm/player.php 6 Oct 2008 23:13:16 -0000 @@ -319,6 +319,9 @@ wwwroot.'/mod/scorm/loadSCO.php?id='.$cm->id.$scoidstr.$modestr.'" target="new">'.get_string('popupblockedlinkname','scorm').''; + print_simple_box(get_string('popupblocked','scorm',$link),'center'); } } else { print_simple_box(get_string('noprerequisites','scorm'),'center'); Index: mod/scorm/settings.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/scorm/settings.php,v retrieving revision 1.3 diff -u -r1.3 settings.php --- mod/scorm/settings.php 16 Sep 2008 22:50:16 -0000 1.3 +++ mod/scorm/settings.php 13 Oct 2008 17:59:03 -0000 @@ -1,13 +1,52 @@ get_string('no'), + 1 => get_string('yes')); + +$settings->add(new admin_setting_configselect('scorm_grademethod', get_string('grademethod', 'scorm'),get_string('grademethoddesc', 'scorm'), '', scorm_get_grade_method_array())); + +for ($i=0; $i<=100; $i++) { + $grades[$i] = "$i"; +} +$settings->add(new admin_setting_configselect('scorm_maxgrade', get_string('maximumgrade'),get_string('maximumgradedesc','scorm'), '', $grades)); + +$settings->add(new admin_setting_configselect('scorm_maxattempts', get_string('maximumattempts', 'scorm'), get_string('maximumattemptsdesc', 'scorm'), '', scorm_get_attempts_array())); + +$settings->add(new admin_setting_configselect('scorm_displayattemptstatus', get_string('displayattemptstatus', 'scorm'),get_string('displayattemptstatusdesc', 'scorm'),'',$yesno)); + +$settings->add(new admin_setting_configselect('scorm_displaycoursestructure', get_string('displaycoursestructure', 'scorm'),get_string('displaycoursestructuredesc', 'scorm'),'',$yesno)); + +$settings->add(new admin_setting_configselect('scorm_forcecompleted', get_string('forcecompleted', 'scorm'),get_string('forcecompleteddesc', 'scorm'),'',$yesno)); + +$settings->add(new admin_setting_configselect('scorm_forcenewattempt', get_string('forcenewattempt', 'scorm'),get_string('forcenewattemptdesc', 'scorm'),'',$yesno)); + +$settings->add(new admin_setting_configselect('scorm_lastattemptlock', get_string('lastattemptlock', 'scorm'),get_string('lastattemptlockdesc', 'scorm'),'',$yesno)); + +$settings->add(new admin_setting_configselect('scorm_whatgrade', get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'), '', scorm_get_what_grade_array())); $settings->add(new admin_setting_configtext('scorm_framewidth', get_string('width', 'scorm'), get_string('framewidth', 'scorm'), 100)); $settings->add(new admin_setting_configtext('scorm_frameheight', get_string('height', 'scorm'), get_string('frameheight', 'scorm'), 500)); + +$settings->add(new admin_setting_configselect('scorm_popup', get_string('display','scorm'), get_string('displaydesc','scorm'), '', scorm_get_popup_display_array())); + +foreach(scorm_get_popup_options_array() as $key => $value){ + $settings->add(new admin_setting_configcheckbox('scorm_'.$key, get_string($key, 'scorm'),'',$value)); +} + +$settings->add(new admin_setting_configselect('scorm_skipview', get_string('skipview', 'scorm'), get_string('skipviewdesc', 'scorm'), '', scorm_get_skip_view_array())); + +$settings->add(new admin_setting_configselect('scorm_hidebrowse', get_string('hidebrowse', 'scorm'), get_string('hidebrowsedesc', 'scorm'), '', $yesno)); + +$settings->add(new admin_setting_configselect('scorm_hidetoc', get_string('hidetoc', 'scorm'), get_string('hidetocdesc', 'scorm'), '', corm_get_hidetoc_array())); + +$settings->add(new admin_setting_configselect('scorm_hidenav', get_string('hidenav', 'scorm'), get_string('hidenavdesc', 'scorm'), '', $yesno)); + +$settings->add(new admin_setting_configselect('scorm_auto', get_string('autocontinue', 'scorm'), get_string('autocontinuedesc', 'scorm'), '', $yesno)); -$settings->add(new admin_setting_configtext('scorm_maxattempts', get_string('maximumattempts', 'scorm'), - '', 6)); +$settings->add(new admin_setting_configselect('scorm_updatefreq', get_string('updatefreq', 'scorm'), get_string('updatefreqdesc', 'scorm'), '', scorm_get_updatefreq_array())); $settings->add(new admin_setting_configtext('scorm_updatetime', get_string('updatetime', 'scorm'), '', 2));