From a840456731e41b1fc9e2745d9a65d203be3b816b Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 12 Jan 2007 12:20:21 +0000 Subject: [PATCH] MDL-7496 - for numerical and short answer questions, the student was being told they were 'incorrect' before they had even had a chance to enter an answer! --- question/type/shortanswer/questiontype.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/question/type/shortanswer/questiontype.php b/question/type/shortanswer/questiontype.php index 6d7aa9149a1..2919c756af8 100644 --- a/question/type/shortanswer/questiontype.php +++ b/question/type/shortanswer/questiontype.php @@ -146,11 +146,12 @@ class question_shortanswer_qtype extends default_questiontype { $inputname = ' name="'.$nameprefix.'" '; $feedback = ''; - // Assume wrong answer first. - $class = question_get_feedback_class(0); - $feedbackimg = question_get_feedback_image(0); + $class = ''; + $feedbackimg = ''; if ($options->feedback) { + $class = question_get_feedback_class(0); + $feedbackimg = question_get_feedback_image(0); foreach($question->options->answers as $answer) { if ($this->test_response($question, $state, $answer)) {