qformat_gift MDL-26059 fails to import truefalse questions with answer true.

This commit is contained in:
Tim Hunt
2011-01-18 21:38:34 +00:00
parent 5a7f931ee5
commit 2c00fa161e
2 changed files with 69 additions and 1 deletions
+1 -1
View File
@@ -392,7 +392,7 @@ class qformat_gift extends qformat_default {
list($answer, $wrongfeedback, $rightfeedback) =
$this->split_truefalse_comment($answertext, $question->questiontextformat);
if ($answer == "T" OR $answer == "TRUE") {
if ($answer['text'] == "T" OR $answer['text'] == "TRUE") {
$question->correctanswer = 1;
$question->feedbacktrue = $rightfeedback;
$question->feedbackfalse = $wrongfeedback;