MDL-39910 SCORM: hide toggle button when course structure disabled and fix upgrade...
authorDan Marsden <dan@danmarsden.com>
Wed, 25 Sep 2013 07:25:37 +0000 (19:25 +1200)
committerDan Marsden <dan@danmarsden.com>
Wed, 25 Sep 2013 07:25:37 +0000 (19:25 +1200)
mod/scorm/db/upgrade.php
mod/scorm/styles.css

index 242f89e..13ac724 100644 (file)
@@ -149,12 +149,13 @@ function xmldb_scorm_upgrade($oldversion) {
 
         $field = new xmldb_field('hidenav');
         if ($dbman->field_exists($table, $field)) {
-            // Update nav setting to disable navigation buttons.
-            $DB->set_field('scorm', 'nav', 0, array('hidenav' => 1));
             // Update nav setting to show floating navigation buttons under TOC.
             $DB->set_field('scorm', 'nav', 2, array('hidenav' => 0));
-            $DB->set_field('scorm', 'navpositionleft', 215, array('hidenav' => 0));
-            $DB->set_field('scorm', 'navpositiontop', 300, array('hidenav' => 0));
+            $DB->set_field('scorm', 'navpositionleft', 215, array('hidenav' => 2));
+            $DB->set_field('scorm', 'navpositiontop', 300, array('hidenav' => 2));
+
+            // Update nav setting to disable navigation buttons.
+            $DB->set_field('scorm', 'nav', 0, array('hidenav' => 1));
             // Drop hidenav field.
             $dbman->drop_field($table, $field);
         }
index 77d694b..664f4b6 100644 (file)
 #page-mod-scorm-player .structlist  {list-style-type: none;white-space: nowrap;}
 #page-mod-scorm-player .structurelist {position: relative;list-style-type: none;width: 96%;margin:0;padding:0;}
 #page-mod-scorm-player .structurelist ul {padding-left: 0.5em;margin-left: 0.5em;}
-#page-mod-scorm-player #scormpage #scorm_toc.disabled {display:none}
+#page-mod-scorm-player #scormpage #scorm_toc.disabled,
+#page-mod-scorm-player #scormpage #scorm_toc_toggle.disabled {
+    display:none
+}
 
 #page-mod-scorm-view .structurelist  {list-style-type: none;white-space: nowrap;}
 #page-mod-scorm-view .structurelist  {list-style-type: none;white-space: nowrap;}