Skip to content

Commit

Permalink
MDL-32358 : numerical question: validation messages errors
Browse files Browse the repository at this point in the history
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
ppichet committed Apr 16, 2012
1 parent 8e35d0a commit 8886f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion question/type/numerical/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

Expand Down

0 comments on commit 8886f0a

Please sign in to comment.