MDL-13653 droplow not ignoring ungraded items un sum aggregation

This commit is contained in:
skodak
2008-02-25 12:16:56 +00:00
parent e9e0641372
commit 2dc8d0e158
+9
View File
@@ -684,6 +684,15 @@ class grade_category extends grade_object {
}
}
// use 0 if grade missing, droplow used and aggregating all items
if (!$this->aggregateonlygraded and !empty($this->droplow)) {
foreach($items as $itemid=>$value) {
if (!isset($grade_values[$itemid]) and !in_array($itemid, $excluded)) {
$grade_values[$itemid] = 0;
}
}
}
$max = 0;
//find max grade