]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15943 Warning are displayed in a SCORM activity (thanks Dan).
authorpiers <piers>
Tue, 5 Aug 2008 23:17:24 +0000 (23:17 +0000)
committerpiers <piers>
Tue, 5 Aug 2008 23:17:24 +0000 (23:17 +0000)
mod/scorm/player.php

index 6f4cbcd06086af35a79bf84151307ef6c32e7f22..f602cc2351a5f5eafe2f819dedd1050e1e9109aa 100755 (executable)
 
             $orgstr = '&amp;currentorg='.$currentorg;
 
-            if (($scorm->hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0)) {
-
+            if (($scorm->hidenav == 0) && ($sco->previd != 0) && (!isset($sco->previous) || $sco->previous == 0)) {
+                
                 // Print the prev LO button
 
                 $scostr = '&amp;scoid='.$sco->previd;
 
             
 
-            if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0)) {
-
+            if (($scorm->hidenav == 0) && ($sco->nextid != 0) && (!isset($sco->next) || $sco->next == 0)) {
+                
                 // Print the next LO button
 
                 $scostr = '&amp;scoid='.$sco->nextid;
                 <div id="scormnav" class="scorm-right">
         <?php
             $orgstr = '&amp;currentorg='.$currentorg;
-            if (($scorm->hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1)) ) {
-
+            if (($scorm->hidenav == 0) && ($sco->previd != 0) && (!isset($sco->previous) || $sco->previous == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1)) ) {
+                
                 // Print the prev LO button
                 $scostr = '&amp;scoid='.$sco->previd;
                 $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
             if ($scorm->hidetoc == 2) {
                 echo $result->tocmenu;
             }
-            if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1))) {
-
+            if (($scorm->hidenav == 0) && ($sco->nextid != 0) && (!isset($sco->next) || $sco->next == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1))) {
+                
                 // Print the next LO button
                 $scostr = '&amp;scoid='.$sco->nextid;
                 $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;