diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php
index 3938ba33ea0..88de2105172 100644
--- a/mod/scorm/locallib.php
+++ b/mod/scorm/locallib.php
@@ -1306,6 +1306,7 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco
$nextid = 0;
$findnext = false;
$parents[$level]='/';
+ $prevsco = '';
foreach ($scoes as $pos => $sco) {
$isvisible = false;
$sco->title = $sco->title;
@@ -1421,8 +1422,9 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco
if ($sco->id == $scoid) {
$result->prerequisites = true;
}
-
- if ($toclink == TOCFULLURL) { //display toc with urls for structure page
+ if (!empty($prevsco) && scorm_version_check($scorm->version, SCORM_13) && !empty($prevsco->hidecontinue)) {
+ $result->toc .= ''.$statusicon.' '.format_string($sco->title).'';
+ } else if ($toclink == TOCFULLURL) { //display toc with urls for structure page
$url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'¤torg='.$currentorg.$modestr.'&scoid='.$sco->id;
$result->toc .= $statusicon.' '.format_string($sco->title).''.$score."\n";
} else { //display toc for inside scorm player
@@ -1457,6 +1459,7 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco
$nextid = $nextsco->id;
}
}
+ $prevsco = $sco;
}
for ($i=0;$i<$level;$i++) {
$result->toc .= "\t\t\n";
diff --git a/mod/scorm/module.js b/mod/scorm/module.js
index fd14add7552..ef4d1ef1ec3 100644
--- a/mod/scorm/module.js
+++ b/mod/scorm/module.js
@@ -146,11 +146,11 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
* @return void
*/
var scorm_fixnav = function() {
- scorm_buttons[0].set('disabled', (scorm_skipprev(scorm_current_node) == null));
- scorm_buttons[1].set('disabled', (scorm_prev(scorm_current_node) == null));
- scorm_buttons[2].set('disabled', (scorm_up(scorm_current_node) == null));
- scorm_buttons[3].set('disabled', (scorm_next(scorm_current_node) == null));
- scorm_buttons[4].set('disabled', (scorm_skipnext(scorm_current_node) == null));
+ scorm_buttons[0].set('disabled', (scorm_skipprev(scorm_current_node) == null || scorm_skipprev(scorm_current_node).title == null));
+ scorm_buttons[1].set('disabled', (scorm_prev(scorm_current_node) == null || scorm_prev(scorm_current_node).title == null));
+ scorm_buttons[2].set('disabled', (scorm_up(scorm_current_node) == null) || scorm_up(scorm_current_node).title == null);
+ scorm_buttons[3].set('disabled', (scorm_next(scorm_current_node) == null) || scorm_next(scorm_current_node).title == null);
+ scorm_buttons[4].set('disabled', (scorm_skipnext(scorm_current_node) == null || scorm_skipnext(scorm_current_node).title == null));
};
var scorm_resize_parent = function() {