Merge branch 'master_MDL-33938' of git://github.com/danmarsden/moodle into MOODLE_23_...
authorDan Poltawski <dan@moodle.com>
Tue, 3 Jul 2012 04:18:29 +0000 (12:18 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 3 Jul 2012 04:18:29 +0000 (12:18 +0800)
Conflicts:
mod/scorm/db/upgrade.php

1  2 
mod/scorm/db/upgrade.php

@@@ -60,10 -60,19 +60,21 @@@ function xmldb_scorm_upgrade($oldversio
          upgrade_mod_savepoint(true, 2012032101, 'scorm');
      }
  
 +    // Moodle v2.3.0 release upgrade line
 +    // Put any upgrade step following this
 +
+     //rename config var from maxattempts to maxattempt
+     if ($oldversion < 2012061701) {
+         $maxattempts = get_config('scorm', 'maxattempts');
+         $maxattempts_adv = get_config('scorm', 'maxattempts_adv');
+         set_config('maxattempt', $maxattempts, 'scorm');
+         set_config('maxattempt_adv', $maxattempts_adv, 'scorm');
+         unset_config('maxattempts', 'scorm'); //remove old setting.
+         unset_config('maxattempts_adv', 'scorm'); //remove old setting.
+         upgrade_mod_savepoint(true, 2012061701, 'scorm');
+     }
  
 -
      return true;
  }