]> git.mjollnir.org Git - moodle.git/commitdiff
Added 'right answer' feedback to true/false questions.
authorthepurpleblob <thepurpleblob>
Wed, 7 Jul 2004 09:15:33 +0000 (09:15 +0000)
committerthepurpleblob <thepurpleblob>
Wed, 7 Jul 2004 09:15:33 +0000 (09:15 +0000)
mod/quiz/format/gift/format.php

index 335035170ba48f913f97468824a8b9b0db723f29..6a1fb02e74689db8aba2694d9715cfc4269a2547 100755 (executable)
@@ -447,15 +447,20 @@ function writequestion( $question ) {
     case TRUEFALSE:
         if ($question->trueanswer->fraction==1) {
             $answertext = 'TRUE';
-            $feedback = $question->falseanswer->feedback;
+            $wrong_feedback = $question->falseanswer->feedback;
+            $right_feedback = $question->trueanswer->feedback;
         }
         else {
             $answertext = 'FALSE';
-            $feedback = $question->trueanswer->feedback;
+            $wrong_feedback = $question->trueanswer->feedback;
+            $right_feedback = $question->falseanswer->feedback;
         }
         $expout .= "::".$question->name."::".$question->questiontext."{".$answertext;
-        if ($feedback!="") {
-            $expout .= "#".$feedback;
+        if ($wrong_feedback!="") {
+            $expout .= "#".$wrong_feedback;
+        }
+        if ($right_feedback!="") {
+            $expout .= "#".$right_feedback;
         }
         $expout .= "}\n";
         break;