$orgstr = '&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 = '&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 = '&scoid='.$sco->nextid;
<div id="scormnav" class="scorm-right">
<?php
$orgstr = '&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 = '&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 = '&scoid='.$sco->nextid;
$url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;