projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46d7981
)
MDL-10239:
author
thepurpleblob
<thepurpleblob>
Thu, 26 Jul 2007 15:08:16 +0000
(15:08 +0000)
committer
thepurpleblob
<thepurpleblob>
Thu, 26 Jul 2007 15:08:16 +0000
(15:08 +0000)
Improper check for correct answer in true/false questions
question/format/blackboard_6/format.php
patch
|
blob
|
history
diff --git
a/question/format/blackboard_6/format.php
b/question/format/blackboard_6/format.php
index 0cb6cbdeb8eeebd6e9d6811ed24cc415ff167aaa..10b65b8bf96f396828c8262ecef2b07590e09c30 100644
(file)
--- 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 {