MDL-21403 hardcoded JS legacy code should not use new $PAGE->requires-> api, switching to html_writer instead

This commit is contained in:
Petr Skoda 2010-01-26 10:17:41 +00:00
parent 5a197e9130
commit 25b6fe050c
4 changed files with 10 additions and 10 deletions

View file

@ -81,11 +81,10 @@
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')) {
include_once($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php');
include($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php');
} 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