]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9577:
authorthepurpleblob <thepurpleblob>
Wed, 25 Apr 2007 09:43:37 +0000 (09:43 +0000)
committerthepurpleblob <thepurpleblob>
Wed, 25 Apr 2007 09:43:37 +0000 (09:43 +0000)
Fixing change of name (answer => correctanswer) for true/false questions.

question/format/examview/format.php

index 31952580b27fbff1d5740e2a31a5448925e5e6ea..32bf0e57338425c63d812e828c28b8e1bc7bcc90 100755 (executable)
@@ -203,6 +203,7 @@ class qformat_examview extends qformat_default {
         $choices = array('T' => 1, 'Y' => 1, 'F' => 0, 'N' => 0 );
         $answer = trim($qrec['answer'][0]['#']);
         $question->answer = $choices[$answer];
+        $question->correctanswer = $question->answer;
         if ($question->answer == 1) {
             $question->feedbacktrue = 'Correct';
             $question->feedbackfalse = 'Incorrect';