Merge branch 'MDL-38370-master' of git://github.com/ankitagarwal/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 19 Mar 2013 23:30:49 +0000 (00:30 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 19 Mar 2013 23:30:49 +0000 (00:30 +0100)
mod/scorm/lib.php

index f9c2b5c..4449ec7 100644 (file)
@@ -391,7 +391,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 .= '<div class="mod-scorm">'."\n";
         foreach ($orgs as $org) {