MDL-28721 SCORM - respect hide navigation buttons setting.
authorDan Marsden <dan@danmarsden.com>
Thu, 11 Aug 2011 21:55:13 +0000 (09:55 +1200)
committerDan Marsden <dan@danmarsden.com>
Thu, 11 Aug 2011 23:06:58 +0000 (11:06 +1200)
mod/scorm/mod_form.php
mod/scorm/module.js

index ebf10af..dc2dcab 100644 (file)
@@ -147,6 +147,7 @@ class mod_scorm_mod_form extends moodleform_mod {
         $mform->addElement('selectyesno', 'hidenav', get_string('hidenav', 'scorm'));
         $mform->setDefault('hidenav', $cfg_scorm->hidenav);
         $mform->setAdvanced('hidenav', $cfg_scorm->hidenav_adv);
+        $mform->disabledIf('hidenav', 'hidetoc', 'noteq', 0);
 
         //-------------------------------------------------------------------------------
         // grade Settings
index fd14add..fda54ca 100644 (file)
@@ -32,7 +32,9 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
     var scorm_hide_nav = true;
     var scorm_hide_toc = true;
     if (hide_toc == 0) {
-        scorm_hide_nav = false;
+        if (hide_nav != 1) {
+            scorm_hide_nav = false;
+        }
         scorm_hide_toc = false;
     } else if (hide_toc == 3) {
         scorm_disable_toc = true;