MDL-67151 qtype_numerical: convert the tolerance to string before saving

Fix the sqlserver issue when saving a number into a text field
This commit is contained in:
Shamim Rezaie
2019-12-20 01:11:59 +11:00
parent 9173b83e58
commit 6d1eb00445
+1
View File
@@ -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);