Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 8858129c17361715d33211bc8e770664a35c5f28 1 parent b1d3043
@ppichet ppichet authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  question/type/numerical/renderer.php
View
2  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'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.