MDL-28937 SCORM 2004 ADL TEST CM-01 MDL-28740 first part of check for hidecontinue...
[moodle.git] / mod / scorm / module.js
index fd14add..ef4d1ef 100644 (file)
@@ -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() {