Skip to content

Commit

Permalink
MDL-39910 SCORM: hide toggle button when course structure disabled an…
Browse files Browse the repository at this point in the history
…d fix upgrade of old settings
  • Loading branch information
danmarsden committed Sep 25, 2013
1 parent df5c708 commit 6db676b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions mod/scorm/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 4 additions & 1 deletion mod/scorm/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
#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;}
Expand Down

0 comments on commit 6db676b

Please sign in to comment.