Permalink
Browse files

MDL-32358 : numerical question: validation messages errors

The selected unit parameter is added answer paramter when renderer call
 $question->get_validation_error() so that it mimics the
is_complete_response(array $response) structure.
  • Loading branch information...
1 parent 8e35d0a commit 8886f0ace04e410f07ef5aac9dca308f4d3ae34f @ppichet ppichet committed Apr 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/type/numerical/renderer.php
@@ -126,7 +126,7 @@ public function formulation_and_controls(question_attempt $qa,
if ($qa->get_state() == question_state::$invalid) {
$result .= html_writer::nonempty_tag('div',
- $question->get_validation_error(array('answer' => $currentanswer)),
+ $question->get_validation_error(array('answer' => $currentanswer, 'unit' => $selectedunit)),
array('class' => 'validationerror'));
}

0 comments on commit 8886f0a

Please sign in to comment.