MDL-36853 SCORM: get first valid sco instead of array of scos - thanks to Jamie Smith for the fix - fixes PHP warnings when returning to an existing attempt.

This commit is contained in:
Dan Marsden
2013-01-11 19:51:32 +13:00
parent d63a406b02
commit 840193d514
+1 -1
View File
@@ -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);
}