diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index 6f39b42e5ce..6e2a89a94c3 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -225,6 +225,7 @@ class qtype_numerical extends question_type { if ($options->tolerance === false) { $result->notice = get_string('invalidnumerictolerance', 'qtype_numerical'); } + $options->tolerance = (string)$options->tolerance; } if (isset($options->id)) { $DB->update_record('question_numerical', $options);