Browse files

selliott - Fixed mixup in feedback for true/false questions

  • Loading branch information...
1 parent 28f312c commit 52dd8d7dbf5787d98dd6eceee3e781e41484db39 selliott committed Aug 8, 2003
Showing with 7 additions and 6 deletions.
  1. +7 −6 mod/quiz/format/blackboard.php
View
13 mod/quiz/format/blackboard.php
@@ -96,14 +96,15 @@ function process_tf($xml, &$questions) {
// first choice is true, second is false.
$id = $choices[0]["@"]["id"];
- $question->feedbacktrue = addslashes(trim($thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_CORRECT"][0]["#"]));
- $question->feedbackfalse = addslashes(trim($thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_INCORRECT"][0]["#"]));
-
- if (strcmp($id, $correct_answer) == 0) // true is correct
+ if (strcmp($id, $correct_answer) == 0) { // true is correct
$question->answer = 1;
- else // false is correct
+ $question->feedbacktrue = addslashes(trim($thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_CORRECT"][0]["#"]));
+ $question->feedbackfalse = addslashes(trim($thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_INCORRECT"][0]["#"]));
+ } else { // false is correct
$question->answer = 0;
-
+ $question->feedbacktrue = addslashes(trim($thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_INCORRECT"][0]["#"]));
+ $question->feedbackfalse = addslashes(trim($thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_CORRECT"][0]["#"]));
+ }
$questions[] = $question;
}
}

0 comments on commit 52dd8d7

Please sign in to comment.