From: mudrd8mz Date: Thu, 29 May 2008 17:27:36 +0000 (+0000) Subject: MDL-15036 Merged from 19_STABLE. Did not work with PostgreSQL X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ecc11af02feb6b1af94dc3dd697cb4ee55e5106c;p=moodle.git MDL-15036 Merged from 19_STABLE. Did not work with PostgreSQL --- diff --git a/grade/report/outcomes/index.php b/grade/report/outcomes/index.php index 55dbf21680..aa7c2e4a55 100644 --- a/grade/report/outcomes/index.php +++ b/grade/report/outcomes/index.php @@ -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";