MDL-20636 Merge branch 'master' into qe2_wip
[moodle.git] / question / format / gift / format.php
index 168dc54..6d3e4c4 100644 (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;