From 5255100dac824343e140b04365954c4612e29b2c Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 9 Nov 2011 12:51:01 +0000 Subject: [PATCH] MDL-30199 qtype numerical etc. Don't require tolerance for answer *. --- question/type/numerical/edit_numerical_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/numerical/edit_numerical_form.php b/question/type/numerical/edit_numerical_form.php index 512f6949581..2775ef0b8d5 100644 --- a/question/type/numerical/edit_numerical_form.php +++ b/question/type/numerical/edit_numerical_form.php @@ -264,7 +264,7 @@ class qtype_numerical_edit_form extends question_edit_form { 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'); }