mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-21403 hardcoded JS legacy code should not use new $PAGE->requires-> api, switching to html_writer instead
This commit is contained in:
parent
5a197e9130
commit
25b6fe050c
4 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue