diff --git a/grade/classes/form/add_category.php b/grade/classes/form/add_category.php index dc754d9e945..8ab7f2e6005 100644 --- a/grade/classes/form/add_category.php +++ b/grade/classes/form/add_category.php @@ -431,6 +431,7 @@ class add_category extends dynamic_form { } else { $element =& $mform->createElement('text', 'grade_item_aggregationcoef', get_string($coefstring, 'grades')); + $mform->setType('grade_item_aggregationcoef', PARAM_FLOAT); } $mform->insertElementBefore($element, 'parentcategory'); $mform->addHelpButton('grade_item_aggregationcoef', $coefstring, 'grades'); diff --git a/grade/classes/form/add_item.php b/grade/classes/form/add_item.php index d79186bc093..548f0ac6961 100644 --- a/grade/classes/form/add_item.php +++ b/grade/classes/form/add_item.php @@ -303,6 +303,7 @@ class add_item extends dynamic_form { $element =& $mform->createElement('checkbox', 'aggregationcoef', get_string($coefstring, 'grades')); } else { $element =& $mform->createElement('text', 'aggregationcoef', get_string($coefstring, 'grades')); + $mform->setType('aggregationcoef', PARAM_FLOAT); } if ($mform->elementExists('parentcategory')) { $mform->insertElementBefore($element, 'parentcategory');