MDL-15036 Merged from 19_STABLE. Did not work with PostgreSQL

This commit is contained in:
mudrd8mz
2008-05-29 17:27:36 +00:00
parent 0f56d9297c
commit ecc11af02f
+1 -1
View File
@@ -63,7 +63,7 @@ foreach ($outcomes as $outcomeid => $outcome) {
// Get average grades for each item
if (is_array($report_info[$outcomeid]['items'])) {
foreach ($report_info[$outcomeid]['items'] as $itemid => $item) {
$sql = "SELECT id, AVG(finalgrade) AS `avg`, COUNT(finalgrade) AS `count`
$sql = "SELECT itemid, AVG(finalgrade) AS avg, COUNT(finalgrade) AS count
FROM {$CFG->prefix}grade_grades
WHERE itemid = $itemid
GROUP BY itemid";