From 840193d514006a1f66ea6c84d4290996aa0bb466 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 11 Jan 2013 19:47:55 +1300 Subject: [PATCH] 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. --- mod/scorm/locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php index e5e4fbc204a33..1d01f25af6c80 100644 --- a/mod/scorm/locallib.php +++ b/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); }