Skip to content

Commit

Permalink
MDL-37844 SCORM: fix js error and highlight selected node in TOC.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Apr 7, 2013
1 parent 422f68f commit c848280
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mod/scorm/module.js
Expand Up @@ -24,6 +24,7 @@
mod_scorm_launch_next_sco = null; mod_scorm_launch_next_sco = null;
mod_scorm_launch_prev_sco = null; mod_scorm_launch_prev_sco = null;
mod_scorm_activate_item = null; mod_scorm_activate_item = null;
scorm_layout_widget = null;


M.mod_scorm = {}; M.mod_scorm = {};


Expand All @@ -41,7 +42,6 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
} }


scoes_nav = JSON.parse(scoes_nav); scoes_nav = JSON.parse(scoes_nav);
var scorm_layout_widget;
var scorm_current_node; var scorm_current_node;
var scorm_buttons = []; var scorm_buttons = [];
var scorm_bloody_labelclick = false; var scorm_bloody_labelclick = false;
Expand Down Expand Up @@ -152,7 +152,7 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
scorm_resize_frame(); scorm_resize_frame();


var left = scorm_layout_widget.getUnitByPosition('left'); var left = scorm_layout_widget.getUnitByPosition('left');
if (left.expanded) { if (left.expand) {
scorm_current_node.focus(); scorm_current_node.focus();
} }
if (scorm_hide_nav == false) { if (scorm_hide_nav == false) {
Expand Down Expand Up @@ -608,9 +608,8 @@ M.mod_scorm.connectPrereqCallback = {
hnode = scorm_tree_node.getNodeByIndex(hidx); hnode = scorm_tree_node.getNodeByIndex(hidx);
if (hnode) { if (hnode) {
hnode.highlight(); hnode.highlight();
scorm_layout_widget = Y.YUI2.widget.Layout.getLayoutById('scorm_layout');
var left = scorm_layout_widget.getUnitByPosition('left'); var left = scorm_layout_widget.getUnitByPosition('left');
if (left.expanded) { if (left.expand) {
hnode.focus(); hnode.focus();
} }
} }
Expand Down

0 comments on commit c848280

Please sign in to comment.