MDL-13147 fixing undefined ungraded array and its indexes; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-02-02 21:23:41 +00:00
parent 14656d15a0
commit d1556c0985

View 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;