Permalink
Browse files

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

  • Loading branch information...
1 parent e25ecdf commit 5255100dac824343e140b04365954c4612e29b2c @timhunt timhunt committed Nov 9, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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');
}

0 comments on commit 5255100

Please sign in to comment.