MDL-78858 grade: set types on aggregation form text fields.

This commit is contained in:
Paul Holden
2023-07-31 11:27:29 +01:00
parent a1d5d1b2f7
commit 124113515e
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -434,6 +434,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');
+1
View File
@@ -320,6 +320,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');