From 78268862d303d4e9490df081e013015fc47ce107 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 21 Oct 2008 05:45:39 +0000 Subject: [PATCH] quiz reports: MDL-16948 SQL does not work in Oracle - you are not allowed to refer to output column names in GROUP BY. Fix thanks to Francois Marier. --- mod/quiz/report/reportlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/quiz/report/reportlib.php b/mod/quiz/report/reportlib.php index ba77bd674dc..71a167945de 100644 --- a/mod/quiz/report/reportlib.php +++ b/mod/quiz/report/reportlib.php @@ -273,7 +273,7 @@ function quiz_report_grade_bands($bandwidth, $bands, $quizid, $userids=array()){ WHERE qg.quiz = q.id " . ($usql?"AND qg.userid $usql ":'') . "AND qg.quiz = ? - GROUP BY band + GROUP BY FLOOR(qg.grade/$bandwidth) ORDER BY band"; $params[] = $quizid; $data = $DB->get_records_sql_menu($sql, $params);