From 1b36a5859771060e4f05888ef9eaca73f2ced2b6 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Thu, 26 Jul 2007 15:08:16 +0000 Subject: [PATCH] MDL-10239: Improper check for correct answer in true/false questions --- question/format/blackboard_6/format.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/question/format/blackboard_6/format.php b/question/format/blackboard_6/format.php index 0cb6cbdeb8e..10b65b8bf96 100644 --- a/question/format/blackboard_6/format.php +++ b/question/format/blackboard_6/format.php @@ -558,9 +558,10 @@ function process_tf($quest, &$questions) { $question->qtype = TRUEFALSE; $question->single = 1; // Only one answer is allowed - - // first choice is true, second is false. - if ($quest->responses[0]->fraction == 1) { + // 0th [response] is the correct answer. + $responses = $quest->responses; + $correctresponse = $responses[0]->ident[0]['varequal'][0]['#']; + if ($correctresponse != 'false') { $correct = true; } else {