From ec3d11dd00e30dc7aedfb47a391522e4482d5eca Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 21 Oct 2008 05:45:28 +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 8b041e19bc3..4d8986b1dc6 100644 --- a/mod/quiz/report/reportlib.php +++ b/mod/quiz/report/reportlib.php @@ -188,7 +188,7 @@ function quiz_report_grade_bands($bandwidth, $bands, $quizid, $useridlist=''){ {$CFG->prefix}quiz q WHERE qg.quiz = q.id AND qg.quiz = $quizid ".($useridlist?"AND qg.userid IN ($useridlist) ":'')." - GROUP BY band + GROUP BY FLOOR(qg.grade/$bandwidth) ORDER BY band"; if (!$data = get_records_sql_menu($sql)){ $data= array();