mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
fixed a warning when group members have no grades
This commit is contained in:
parent
b58db965b4
commit
ab3444d79d
@ -807,13 +807,14 @@ class grade_report_grader extends grade_report {
|
||||
|
||||
$sum_array = array();
|
||||
$count_array = array();
|
||||
$sums = get_records_sql($SQL);
|
||||
foreach ($sums as $itemid => $csum) {
|
||||
$sum_array[$itemid] = $csum->sum;
|
||||
if ($totalcount) {
|
||||
$count_array[$itemid] = $totalcount;
|
||||
} else {
|
||||
$count_array[$itemid] = $csum->count;
|
||||
if ($sums = get_records_sql($SQL)) {
|
||||
foreach ($sums as $itemid => $csum) {
|
||||
$sum_array[$itemid] = $csum->sum;
|
||||
if ($totalcount) {
|
||||
$count_array[$itemid] = $totalcount;
|
||||
} else {
|
||||
$count_array[$itemid] = $csum->count;
|
||||
}
|
||||
}
|
||||
}
|
||||
$avghtml = '<tr><th>'.$straverage.'</th>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user