]> git.mjollnir.org Git - moodle.git/commitdiff
quiz reports: MDL-16948 SQL does not work in Oracle - you are not allowed to refer...
authortjhunt <tjhunt>
Tue, 21 Oct 2008 05:45:39 +0000 (05:45 +0000)
committertjhunt <tjhunt>
Tue, 21 Oct 2008 05:45:39 +0000 (05:45 +0000)
mod/quiz/report/reportlib.php

index ba77bd674dcaa573b977dac52cc0479bcc811432..71a167945de5fa0c3ca4228f01c8cb95396da28f 100644 (file)
@@ -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);