Browse files

MDL-36853 SCORM: get first valid sco instead of array of scos - thank…

…s to Jamie Smith for the fix - fixes PHP warnings when returning to an existing attempt.
  • Loading branch information...
1 parent 9da506c commit 3c443042763bfa540ead880e7f7ee25164096ba7 @danmarsden danmarsden committed Jan 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/scorm/locallib.php
View
2 mod/scorm/locallib.php
@@ -1772,7 +1772,7 @@ function scorm_get_toc($user, $scorm, $cmid, $toclink=TOCJSLINK, $currentorg='',
}
if (empty($scoid)) {
- $result->sco = $scoes['scoes'][0]->children;
+ $result->sco = $scoes['scoes'][0]->children[0];
} else {
$result->sco = scorm_get_sco($scoid);
}

0 comments on commit 3c44304

Please sign in to comment.