From 9173b83e586b4681b112ecb223422af60a48097b Mon Sep 17 00:00:00 2001 From: Shamim Rezaie Date: Mon, 25 Nov 2019 17:07:11 +1100 Subject: [PATCH] MDL-67151 qtype_calculatedsimple: Support for the scientific format --- question/type/calculatedsimple/edit_calculatedsimple_form.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/question/type/calculatedsimple/edit_calculatedsimple_form.php b/question/type/calculatedsimple/edit_calculatedsimple_form.php index a48372e02fc..7af36e2d43d 100644 --- a/question/type/calculatedsimple/edit_calculatedsimple_form.php +++ b/question/type/calculatedsimple/edit_calculatedsimple_form.php @@ -508,8 +508,7 @@ class qtype_calculatedsimple_edit_form extends qtype_calculated_edit_form { $mform->addElement('hidden', "number[{$j}]", ''); $mform->setType("number[{$j}]", PARAM_LOCALISEDFLOAT); // Localisation handling has to be done manually. if (isset($this->formdata["number[{$j}]"])) { - $number = $this->formdata["number[{$j}]"]; - $this->formdata["number[{$j}]"] = format_float($number, strlen($number), true, true); + $this->formdata["number[{$j}]"] = format_float($this->formdata["number[{$j}]"], -1); } }