From c48c9bf02fbe3fd2840e983c01752e0af67cc169 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 12 Jun 2014 13:56:36 +0800 Subject: [PATCH] MDL-42835 Scorm: Fix for JS error because no nodes are selected in the toc. --- mod/scorm/locallib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php index 5eba60a94a4..3794cbd3cce 100644 --- a/mod/scorm/locallib.php +++ b/mod/scorm/locallib.php @@ -1403,7 +1403,8 @@ function scorm_format_duration($duration) { function scorm_get_toc_object($user, $scorm, $currentorg='', $scoid='', $mode='normal', $attempt='', $play=false, $organizationsco=null) { global $CFG, $DB, $PAGE, $OUTPUT; - $modestr = ''; + // Always pass the mode even if empty as that is what is done elsewhere and the urls have to match. + $modestr = '&mode='; if ($mode != 'normal') { $modestr = '&mode='.$mode; }