MDL-78858 grade: set types on aggregation form text fields.
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user