MDL-21191 Fixing another regression in dependency calculation

This is not easy to spot as $params may just contain one more item than $sql
would expect. However, $sql and $params should be well paired.
This commit is contained in:
David Mudrak
2009-12-25 23:31:59 +00:00
parent 84d6e8323d
commit f5a726feb3
+6 -2
View File
@@ -1343,8 +1343,12 @@ class grade_item extends grade_object {
} else {
$params[] = $grade_category->id;
$params[] = $grade_category->id;
$params[] = GRADE_TYPE_VALUE;
$params[] = GRADE_TYPE_SCALE;
if (empty($CFG->grade_includescalesinaggregation)) {
$params[] = GRADE_TYPE_VALUE;
} else {
$params[] = GRADE_TYPE_VALUE;
$params[] = GRADE_TYPE_SCALE;
}
$sql = "SELECT gi.id
FROM {grade_items} gi
WHERE $gtypes