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

This commit is contained in:
Tim Hunt
2011-11-15 11:22:00 +00:00
parent 6be90ce05f
commit 0f7477c07f
@@ -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');
}