diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index dd410bbaa71..73774e48ae6 100644 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -385,7 +385,10 @@ function scorm_user_complete($course, $user, $mod, $scorm) { array($scorm->id), 'id', 'id,identifier,title')) { if (count($orgs) <= 1) { unset($orgs); - $orgs[]->identifier = ''; + $orgs = array(); + $org = new stdClass(); + $org->identifier = ''; + $orgs[] = $org; } $report .= '