MDL-29815 question engine DB: bad group-by clause detected by Oracle.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 18 Oct 2011 20:06:39 +0000 (21:06 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 20 Oct 2011 10:14:14 +0000 (11:14 +0100)
Thanks to Yanfei Lu for finding this and suggesting the fix.

question/engine/datalib.php

index 092eaa1..2622814 100644 (file)
@@ -367,7 +367,9 @@ GROUP BY
     qa.questionid,
     q.name,
     q.id,
-    summarystate
+    CASE qas.state
+        {$this->full_states_to_summary_state_sql()}
+    END
 
 ORDER BY
     qa.slot,