diff --git a/mod/scorm/datamodels/debug.js.php b/mod/scorm/datamodels/debug.js.php index 9011ab906dc..771ef76d050 100644 --- a/mod/scorm/datamodels/debug.js.php +++ b/mod/scorm/datamodels/debug.js.php @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +echo html_writer::start_tag('script'); ?> '; + logButton.innerHTML = '->'; } else { setLoggingActive('A'); AppendToLog("Moodle Logging Activated", 0); @@ -762,3 +763,7 @@ if (!document.getElementById('mod-scorm-log-toggle')) { var content = safeGetElement(document, 'scormpage'); content.insertBefore(logButton, content.firstChild); } +--> + +requires->js_init_call('M.scorm_api.init', array($def, $cmiobj, $cmiint, // pull in the debugging utilities if (scorm_debugging($scorm)) { - $PAGE->requires->js($CFG->dirroot.'/mod/scorm/datamodels/debug.js.php', true); + require_once($CFG->dirroot.'/mod/scorm/datamodels/debug.js.php'); echo html_writer::script('AppendToLog("Moodle SCORM 1.2 API Loaded, Activity: '.$scorm->name.', SCO: '.$sco->identifier.'", 0);'); } \ No newline at end of file diff --git a/mod/scorm/datamodels/scorm_13.php b/mod/scorm/datamodels/scorm_13.php index fbc76ed7f6b..e8a4f6dadf2 100644 --- a/mod/scorm/datamodels/scorm_13.php +++ b/mod/scorm/datamodels/scorm_13.php @@ -36,6 +36,6 @@ $PAGE->requires->js_init_call('M.scorm_api.init', array($def, $cmiobj, $cmiint, // pull in the debugging utilities if (scorm_debugging($scorm)) { - $PAGE->requires->js($CFG->dirroot.'/mod/scorm/datamodels/debug.js.php', true); + require_once($CFG->dirroot.'/mod/scorm/datamodels/debug.js.php'); echo html_writer::script('AppendToLog("Moodle SCORM 1.3 API Loaded, Activity: '.$scorm->name.', SCO: '.$sco->identifier.'", 0);'); }