Permalink
Browse files

SCORM MDL-24239 update scorm settings correctly during file upgrade

  • Loading branch information...
1 parent bf1b9ef commit bea5ad66cd20a13eec53ab969e153e6e82453014 @danmarsden danmarsden committed Sep 23, 2010
Showing with 17 additions and 1 deletion.
  1. +16 −0 mod/scorm/db/upgrade.php
  2. +1 −1 mod/scorm/version.php
@@ -487,6 +487,22 @@ function scorm_migrate_content_files($context, $base, $path) {
/// 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;
}
@@ -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)?

0 comments on commit bea5ad6

Please sign in to comment.