-
Improvement
-
Resolution: Fixed
-
Minor
-
2.9.3
-
MOODLE_29_STABLE
-
MOODLE_33_STABLE
-
master_
MDL-52168 -
Error in scorm player (TypeError: datamodel.undefined is undefined) when trying to load a SCORM package that has no organization structure defined in imsmanifest.xml
The Moodle scorm API attempts to get the current scoe from the non-existent navigation menu.
This seems to be an issue that has been introduced in the move from YUI2 to YUI3.
In YUI2 when you initialise a treeview control against a dom element that does not exist it returns undefined which means that in the following code in scorm_12.js:
function LMSInitialize (param) {
scoid = scorm_current_node ? scorm_current_node.scoid : scoid;
the application falls back to using the scoid from the URL.
In YUI3 when you initialise a treeview control against a dom element that does not exist it returns some kind of weird empty treeview so the the code above overwrites the correctly set scoid with the non-existent scoid property causing the error. Changing the line to:
function LMSInitialize (param) {
scoid = (scorm_current_node && scorm_current_node.scoid) ? scorm_current_node.scoid : scoid;
solves the problem.
- has been marked as being related by
-
MDL-57123 Moodle 3.1 scoid missing error on SCORM open in new window
- Closed