Skip to content

Commit

Permalink
MDL-26714 qtype_multianswer regression from the previous commit for n…
Browse files Browse the repository at this point in the history
…umerical subquestions.
  • Loading branch information
timhunt committed Apr 28, 2011
1 parent b8df941 commit 4c51e56
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions question/type/multianswer/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,17 @@ public function compare_responses($question, $state, $teststate) {
$teststateforquestion->responses[''] = '';
}

if (!$QTYPES[$wrapped->qtype]->compare_responses($wrapped,
$stateforquestion, $teststateforquestion)) {
return false;
if ($wrapped->qtype == 'numerical') {
// Use shortanswer
if (!$QTYPES['shortanswer']->compare_responses($wrapped,
$stateforquestion, $teststateforquestion)) {
return false;
}
} else {
if (!$QTYPES[$wrapped->qtype]->compare_responses($wrapped,
$stateforquestion, $teststateforquestion)) {
return false;
}
}
}

Expand Down

0 comments on commit 4c51e56

Please sign in to comment.