MDL-54881 quiz: Ensure user attempts are deterministic for testing.
authorRussell Smith <mr-russ@smith2001.net>
Mon, 20 Jun 2016 22:31:26 +0000 (08:31 +1000)
committerRussell Smith <mr-russ@smith2001.net>
Mon, 20 Jun 2016 22:31:26 +0000 (08:31 +1000)
mod/quiz/lib.php

index f4b9175..ef2a706 100644 (file)
@@ -590,7 +590,7 @@ function quiz_get_user_attempts($quizids, $userid, $status = 'finished', $includ
 
     return $DB->get_records_select('quiz_attempts',
             "quiz $insql AND userid = :userid" . $previewclause . $statuscondition,
-            $params, 'attempt ASC');
+            $params, 'quiz, attempt ASC');
 }
 
 /**