Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
2.5.1, 2.6
-
None
-
None
-
MOODLE_25_STABLE, MOODLE_26_STABLE
Description
While trying to test AICC HACP on latest Moodle master branch (20/7/2013)
I got the following JS error:
Uncaught TypeError: Cannot read property 'url' of undefined
|
for the javascript scorm/module.js ~ 533 :
scorm_first_url.title = scoes_nav[launch_sco].url;
|
launch_sco has the wrong value (96) and should be 95.
I am using the MDL-27036 AICC HACP test package. (Attached to this issue too)
Digging into the code, I think I found the problem:
scorm/locallib.php ~ 1775
if (empty($scoid)) {
|
$result->sco = $scoes['scoes'][0]->children[0];
|
} else {
|
Should, probably, be:
if (empty($scoid)) {
|
$result->sco = $scoes['scoes'][0]->id;
|
} else {
|
If changed, It seems to work fine. But, I am not sure I fully get the complexity of the code (after hours of xdebug!) so...
Dan, What do you think?