Merge branch 'master_MDL-41434' of https://github.com/danmarsden/moodle
[moodle.git] / mod / scorm / locallib.php
index edb7362..53d6e42 100644 (file)
@@ -1338,8 +1338,8 @@ function scorm_get_toc_object($user, $scorm, $currentorg='', $scoid='', $mode='n
     global $CFG, $DB, $PAGE, $OUTPUT;
 
     $modestr = '';
-    if ($mode == 'browse') {
-        $modestr = '&mode='.$mode;
+    if ($mode != 'normal') {
+        $modestr = '&mode='.$mode;
     }
 
     $result = array();
@@ -1750,8 +1750,8 @@ function scorm_get_toc($user, $scorm, $cmid, $toclink=TOCJSLINK, $currentorg='',
         $tocmenu = scorm_format_toc_for_droplist($scorm, $scoes['scoes'][0]->children, $scoes['usertracks'], $currentorg, $organizationsco);
 
         $modestr = '';
-        if ($mode == 'browse') {
-            $modestr = '&mode='.$mode;
+        if ($mode != 'normal') {
+            $modestr = '&mode='.$mode;
         }
 
         $url = new moodle_url('/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr);