From 7b6380553171d4321e54d94ffc74410fe1d56c99 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 11 Jan 2013 23:45:23 +1300 Subject: [PATCH] MDL-37394 SCORM: Aicc direct url fails with new nav as it has a single sco with no children - allow these to be navigated correctly. --- mod/scorm/module.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/scorm/module.js b/mod/scorm/module.js index 4ea972cc3ad..2ed708f8f0c 100644 --- a/mod/scorm/module.js +++ b/mod/scorm/module.js @@ -527,6 +527,9 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc // finally activate the chosen item var scorm_first_url = tree.getRoot().children[0]; + if (scorm_first_url == null) { // This is probably a single sco with no children (AICC Direct uses this). + scorm_first_url = tree.getRoot(); + } scorm_first_url.title = scoes_nav[launch_sco].url; scorm_activate_item(scorm_first_url);