]> git.mjollnir.org Git - moodle.git/commitdiff
Fix bug with numerical questions with multiple answers. Merged from MOODLE_17_STABLE.
authortjhunt <tjhunt>
Tue, 17 Oct 2006 15:56:52 +0000 (15:56 +0000)
committertjhunt <tjhunt>
Tue, 17 Oct 2006 15:56:52 +0000 (15:56 +0000)
question/type/numerical/questiontype.php

index 7d53649a1f996ba8071f134bb36fe9892b613522..7b9a0830c9667507e56b625c3b216ce2b072e779 100644 (file)
@@ -34,7 +34,8 @@ class question_numerical_qtype extends question_shortanswer_qtype {
                                 "FROM {$CFG->prefix}question_answers a, " .
                                 "     {$CFG->prefix}question_numerical n " .
                                 "WHERE a.question = $question->id " .
-                                "AND   a.id = n.answer;")) {
+                                "    AND   a.id = n.answer " .
+                                "ORDER BY a.id ASC")) {
             notify('Error: Missing question answer!');
             return false;
         }