Permalink
Browse files

Added 'right answer' feedback to true/false questions.

  • Loading branch information...
1 parent 88c898f commit cbc83a240e9994e37931c9b43504e0f4d5d6ef5b thepurpleblob committed Jul 7, 2004
Showing with 9 additions and 4 deletions.
  1. +9 −4 mod/quiz/format/gift/format.php
@@ -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;

0 comments on commit cbc83a2

Please sign in to comment.