$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['autocontinuedesc'] = 'This preference 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.';
$string['gradeaverage'] = 'Average grade';
$string['gradehighest'] = 'Highest grade';
$string['grademethod'] = 'Grading method';
-$string['grademethoddesc'] = 'This preferences sets the default grade method for an activity';
+$string['grademethoddesc'] = 'This preference 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['hidebrowsedesc'] = 'This preference sets the default for 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['hidenavdesc'] = 'This preference sets the default for 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['hidetocdesc'] = 'This preference 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';
$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['maximumattemptsdesc'] = 'This preference sets the default maximum attempts for an activity';
+$string['maximumgradedesc'] = 'This preference 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';
$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['skipviewdesc'] = 'This preference sets the default for 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';
$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['whatgradedesc'] = 'This preference 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['updatefreqdesc'] = 'This preference 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
unset_config($rcfg);
}
}
-
- $cfg_scorm = get_config('scorm');
- $new_config = array('resizable',
- 'scrollbars',
- 'directories',
- 'location',
- 'menubar',
- 'toolbar',
- 'status');
- foreach ($new_config as $ncfg) {
- if (!isset($cfg_scorm->$ncfg)) {
- set_config($ncfg, 1, 'scorm');
+ /// scorm savepoint reached
+ upgrade_mod_savepoint($result, 2008090306, 'scorm');
+ }
+
+
+
+ // remove redundant config values
+ if ($result && $oldversion < 2008090307) {
+ $redundant_config = array(
+ 'scorm_allowapidebug',
+ 'scorm_allowtypeexternal',
+ 'scorm_allowtypeimsrepository',
+ 'scorm_allowtypelocalsync',
+ 'scorm_apidebugmask',
+ 'scorm_frameheight',
+ 'scorm_framewidth',
+ 'scorm_maxattempts',
+ 'scorm_updatetime',
+ 'scorm_resizable',
+ 'scorm_scrollbars',
+ 'scorm_directories',
+ 'scorm_location',
+ 'scorm_menubar',
+ 'scorm_toolbar',
+ 'scorm_status',
+ 'scorm_grademethod',
+ 'scorm_maxgrade',
+ 'scorm_whatgrade',
+ 'scorm_popup',
+ 'scorm_skipview',
+ 'scorm_hidebrowse',
+ 'scorm_hidetoc',
+ 'scorm_hidenav',
+ 'scorm_auto',
+ 'scorm_updatefreq'
+ );
+ foreach ($redundant_config as $rcfg) {
+ if (isset($CFG->$rcfg)) {
+ unset_config($rcfg);
}
}
+
/// scorm savepoint reached
- upgrade_mod_savepoint($result, 2008090306, 'scorm');
+ upgrade_mod_savepoint($result, 2008090307, 'scorm');
}
}
function scorm_option2text($scorm) {
- $SCORM_POPUP_OPTIONS = array('resizable'=>1,
- 'scrollbars'=>1,
- 'directories'=>0,
- 'location'=>0,
- 'menubar'=>0,
- 'toolbar'=>0,
- 'status'=>0);
-
+ $scorm_popoup_options = scorm_get_popup_options_array();
+
if (isset($scorm->popup)) {
if ($scorm->popup == 1) {
$optionlist = array();
- foreach ($SCORM_POPUP_OPTIONS as $name => $option) {
+ foreach ($scorm_popoup_options as $name => $option) {
if (isset($scorm->$name)) {
$optionlist[] = $name.'='.$scorm->$name;
} else {
global $CFG;
$cfg_scorm = get_config('scorm');
- 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);
+ return array('resizable'=> isset($cfg_scorm->resizable) ? $cfg_scorm->resizable : 0,
+ 'scrollbars'=> isset($cfg_scorm->scrollbars) ? $cfg_scorm->scrollbars : 0,
+ 'directories'=> isset($cfg_scorm->directories) ? $cfg_scorm->directories : 0,
+ 'location'=> isset($cfg_scorm->location) ? $cfg_scorm->location : 0,
+ 'menubar'=> isset($cfg_scorm->menubar) ? $cfg_scorm->menubar : 0,
+ 'toolbar'=> isset($cfg_scorm->toolbar) ? $cfg_scorm->toolbar : 0,
+ 'status'=> isset($cfg_scorm->status) ? $cfg_scorm->status : 0);
}
/**
global $COURSE;
if (isset($default_values['popup']) && ($default_values['popup'] == 1) && isset($default_values['options'])) {
- $options = explode(',',$default_values['options']);
- foreach ($options as $option) {
- list($element,$value) = explode('=',$option);
- $element = trim($element);
- $default_values[$element] = trim($value);
+ if (!empty($default_values['options'])) {
+ $options = explode(',',$default_values['options']);
+ foreach ($options as $option) {
+ list($element,$value) = explode('=',$option);
+ $element = trim($element);
+ $default_values[$element] = trim($value);
+ }
}
}
if (isset($default_values['grademethod'])) {
// catch up now, so until 27th October please only increment in very tiny steps
// in HEAD, until we get past that date..
-$module->version = 2008090306; // The (date) version of this module
+$module->version = 2008090307; // The (date) version of this module
$module->requires = 2008090108; // The version of Moodle that is required
$module->cron = 300; // How often should cron check this module (seconds)?