Merge branch 'master_MDL-39910' of https://github.com/mayankgupta/moodle
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
+33
-9
@@ -210,15 +210,39 @@ M.mod_scorm.init = function(Y, nav_display, navposition_left, navposition_top, h
|
||||
* @return void
|
||||
*/
|
||||
var scorm_fixnav = function() {
|
||||
scorm_buttons[0].set('disabled', ((scorm_skipprev(scorm_current_node) === null) || (scorm_skipprev(scorm_current_node).parent.isRoot()) ||
|
||||
(scorm_skipprev(scorm_current_node).title === null) || (scoes_nav[launch_sco].hideprevious === 1)));
|
||||
scorm_buttons[1].set('disabled', ((scorm_prev(scorm_current_node) === null) || (scorm_skipprev(scorm_current_node).parent.isRoot()) ||
|
||||
(scorm_prev(scorm_current_node).title === null) || (scoes_nav[launch_sco].hideprevious === 1)));
|
||||
scorm_buttons[2].set('disabled', (scorm_up(scorm_current_node) === null) || (scorm_up(scorm_current_node).parent.isRoot()) ||
|
||||
(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) &&
|
||||
(scoes_nav[launch_sco].flow !== 1)) || (scoes_nav[launch_sco].hidecontinue === 1)));
|
||||
scorm_buttons[4].set('disabled', (scorm_skipnext(scorm_current_node) === null || scorm_skipnext(scorm_current_node).title === null ||
|
||||
var skipprevnode = scorm_skipprev(scorm_current_node);
|
||||
var prevnode = scorm_prev(scorm_current_node);
|
||||
var skipnextnode = scorm_skipnext(scorm_current_node);
|
||||
var nextnode = scorm_next(scorm_current_node);
|
||||
var upnode = scorm_up(scorm_current_node);
|
||||
|
||||
scorm_buttons[0].set('disabled', ((skipprevnode === null) ||
|
||||
(typeof(skipprevnode.scoid) === 'undefined') ||
|
||||
(scoes_nav[skipprevnode.scoid].isvisible === "false") ||
|
||||
(skipprevnode.title === null) ||
|
||||
(scoes_nav[launch_sco].hideprevious === 1)));
|
||||
|
||||
scorm_buttons[1].set('disabled', ((prevnode === null) ||
|
||||
(typeof(prevnode.scoid) === 'undefined') ||
|
||||
(scoes_nav[prevnode.scoid].isvisible === "false") ||
|
||||
(prevnode.title === null) ||
|
||||
(scoes_nav[launch_sco].hideprevious === 1)));
|
||||
|
||||
scorm_buttons[2].set('disabled', (upnode === null) ||
|
||||
(typeof(upnode.scoid) === 'undefined') ||
|
||||
(scoes_nav[upnode.scoid].isvisible === "false") ||
|
||||
(upnode.title === null));
|
||||
|
||||
scorm_buttons[3].set('disabled', ((nextnode === null) ||
|
||||
((nextnode.title === null) && (scoes_nav[launch_sco].flow !== 1)) ||
|
||||
(typeof(nextnode.scoid) === 'undefined') ||
|
||||
(scoes_nav[nextnode.scoid].isvisible === "false") ||
|
||||
(scoes_nav[launch_sco].hidecontinue === 1)));
|
||||
|
||||
scorm_buttons[4].set('disabled', ((skipnextnode === null) ||
|
||||
(skipnextnode.title === null) ||
|
||||
(typeof(skipnextnode.scoid) === 'undefined') ||
|
||||
(scoes_nav[skipnextnode.scoid].isvisible === "false") ||
|
||||
scoes_nav[launch_sco].hidecontinue === 1));
|
||||
};
|
||||
|
||||
|
||||
@@ -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;}
|
||||
|
||||
Reference in New Issue
Block a user