SCORM MDL-24239 update scorm settings correctly during file upgrade

This commit is contained in:
Dan Marsden
2010-09-23 23:38:43 +00:00
parent bf1b9ef70b
commit bea5ad66cd
2 changed files with 17 additions and 1 deletions
+16
View File
@@ -487,6 +487,22 @@ function xmldb_scorm_upgrade($oldversion) {
/// scorm savepoint reached
upgrade_mod_savepoint(true, 2010070800, 'scorm');
}
if ($oldversion < 2010092400) {
$count = $DB->count_records('scorm', array('scormtype'=>'external'));
if (!empty($count)) {
set_config('allowtypeexternal', '1', 'scorm');
}
$count = $DB->count_records('scorm', array('scormtype'=>'localsync'));
if (!empty($count)) {
set_config('allowtypelocalsync', '1', 'scorm');
}
$count = $DB->count_records('scorm', array('scormtype'=>'imsrepository'));
if (!empty($count)) {
set_config('allowtypeimsrepository', '1', 'scorm');
}
/// scorm savepoint reached
upgrade_mod_savepoint(true, 2010092400, 'scorm');
}
return true;
}
+1 -1
View File
@@ -6,7 +6,7 @@
/////////////////////////////////////////////////////////////////////////////////
$module->version = 2010080300; // The (date) version of this module
$module->version = 2010092400; // The (date) version of this module
$module->requires = 2010080300; // The version of Moodle that is required
$module->cron = 300; // How often should cron check this module (seconds)?