]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15036 Merged from 19_STABLE. Did not work with PostgreSQL
authormudrd8mz <mudrd8mz>
Thu, 29 May 2008 17:27:36 +0000 (17:27 +0000)
committermudrd8mz <mudrd8mz>
Thu, 29 May 2008 17:27:36 +0000 (17:27 +0000)
grade/report/outcomes/index.php

index 55dbf21680fd31df68b29604cf243aeb1a13eb15..aa7c2e4a55c2617001d3898170ad743779917886 100644 (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";