Permalink
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 d63a406 commit 840193d514006a1f66ea6c84d4290996aa0bb466 @danmarsden danmarsden committed Jan 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 840193d

Please sign in to comment.