MDL-44938 SCORM: missing constant definition during upgrade.
authorDan Marsden <dan@danmarsden.com>
Thu, 3 Apr 2014 20:38:48 +0000 (09:38 +1300)
committerDan Marsden <dan@danmarsden.com>
Thu, 3 Apr 2014 20:38:48 +0000 (09:38 +1300)
mod/scorm/db/upgrade.php

index b7dd657..37f3b20 100644 (file)
@@ -83,6 +83,7 @@ function xmldb_scorm_upgrade($oldversion) {
 
     // Remove old imsrepository type - convert any existing records to external type to help prevent major errors.
     if ($oldversion < 2013081301) {
+        require_once($CFG->dirroot . '/mod/scorm/lib.php');
         $scorms = $DB->get_recordset('scorm', array('scormtype' => 'imsrepository'));
         foreach ($scorms as $scorm) {
             $scorm->scormtype = SCORM_TYPE_EXTERNAL;