Merge branch 'm20_MDL-26176_cleanup' of github.com:danmarsden/moodle
[moodle.git] / mod / scorm / loaddatamodel.php
index 7766692..73ebd04 100644 (file)
         print_error('cannotfindsco', 'scorm');
     }
     $scorm->version = strtolower(clean_param($scorm->version, PARAM_SAFEDIR));   // Just to be safe
         print_error('cannotfindsco', 'scorm');
     }
     $scorm->version = strtolower(clean_param($scorm->version, PARAM_SAFEDIR));   // Just to be safe
-    $PAGE->requires->js('lib/cookies.js')->asap();
     if (file_exists($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php')) {
     if (file_exists($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php')) {
-        include_once($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php');
+        include($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php');
     } else {
     } else {
-        include_once($CFG->dirroot.'/mod/scorm/datamodels/scorm_12.js.php');
+        include($CFG->dirroot.'/mod/scorm/datamodels/scorm_12.js.php');
     }
     }
-
     // set the start time of this SCO
     scorm_insert_track($USER->id,$scorm->id,$scoid,$attempt,'x.start.time',time());
 ?>
     // set the start time of this SCO
     scorm_insert_track($USER->id,$scorm->id,$scoid,$attempt,'x.start.time',time());
 ?>