]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13147 fixing undefined ungraded array and its indexes; merged from MOODLE_19_STABLE
authorskodak <skodak>
Sat, 2 Feb 2008 21:23:41 +0000 (21:23 +0000)
committerskodak <skodak>
Sat, 2 Feb 2008 21:23:41 +0000 (21:23 +0000)
grade/report/grader/lib.php

index 298b96b2298cbaab69f0586f8f1c2df24bdfd778..3345815776d8f8192b4d34e3c7919d0cdcf3bcd4 100644 (file)
@@ -994,7 +994,11 @@ class grade_report_grader extends grade_report {
                     $sum_array[$item->id] = 0;
                 }
 
-                $ungraded_count = $ungraded_counts[$itemid]->count;
+                if (isset($ungraded_counts[$itemid])) {
+                    $ungraded_count = $ungraded_counts[$itemid]->count;
+                } else {
+                    $ungraded_count = 0;
+                }
 
                 if ($meanselection == GRADE_REPORT_MEAN_GRADED) {
                     $mean_count = $totalcount - $ungraded_count;