Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-30199 qtype numerical etc. Don't require tolerance for answer *.

  • Loading branch information...
commit 5255100dac824343e140b04365954c4612e29b2c 1 parent e25ecdf
@timhunt timhunt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  question/type/numerical/edit_numerical_form.php
View
2  question/type/numerical/edit_numerical_form.php
@@ -264,7 +264,7 @@ protected function validate_answers($data, $errors) {
if ($data['fraction'][$key] == 1) {
$maxgrade = true;
}
- if (!is_numeric($data['tolerance'][$key])) {
+ if ($answer !== '*' && !is_numeric($data['tolerance'][$key])) {
$errors['tolerance['.$key.']'] =
get_string('mustbenumeric', 'qtype_calculated');
}
Please sign in to comment.
Something went wrong with that request. Please try again.