Merge branch 'master_MDL-50620' of https://github.com/danmarsden/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 16 Feb 2016 09:09:08 +0000 (09:09 +0000)
committerDan Poltawski <dan@moodle.com>
Tue, 16 Feb 2016 09:09:08 +0000 (09:09 +0000)
1  2 
mod/scorm/db/upgrade.php

@@@ -93,5 -338,19 +93,17 @@@ function xmldb_scorm_upgrade($oldversio
      // Moodle v3.0.0 release upgrade line.
      // Put any upgrade step following this.
  
+     // MDL-50620 Add mastery override option.
+     if ($oldversion < 2016021000) {
+         $table = new xmldb_table('scorm');
+         $field = new xmldb_field('masteryoverride', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '1', 'lastattemptlock');
+         if (!$dbman->field_exists($table, $field)) {
+             $dbman->add_field($table, $field);
+         }
+         upgrade_mod_savepoint(true, 2016021000, 'scorm');
+     }
      return true;
  }
 -
 -