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!

This commit is contained in:
tjhunt 2007-01-12 12:20:21 +00:00
parent 18fd9bf1b9
commit a840456731

View File

@ -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)) {