MDL-35870 mod_scorm : fix for debug.js.php not found error

This commit is contained in:
Nobelium
2014-07-15 16:05:40 +00:00
parent ad88d3ed2a
commit 76c8fa4190
3 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
echo html_writer::start_tag('script');
?>
<!--// hopefully fool ie IE proof way of getting DOM element
@@ -70,7 +71,7 @@ function toggleLog () {
if (getLoggingActive() == "A") {
AppendToLog("Moodle Logging Deactivated", 0);
setLoggingActive('N');
logButton.innerHTML = '--><?php echo addslashes_js(get_string('scormloggingoff', 'scorm')); ?>';
logButton.innerHTML = '-><?php echo addslashes_js(get_string('scormloggingoff', 'scorm')); ?>';
} 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);
}
-->
<?php
echo html_writer::end_tag('script');
+1 -1
View File
@@ -43,6 +43,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.2 API Loaded, Activity: '.$scorm->name.', SCO: '.$sco->identifier.'", 0);');
}
+1 -1
View File
@@ -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);');
}