mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-40022 badges: Fix missing calls to setType in course criteria settings
This commit is contained in:
parent
d35d831190
commit
111c5fd93f
@ -168,6 +168,7 @@ abstract class award_criteria {
|
||||
if (in_array('grade', $this->optional_params)) {
|
||||
$parameter[] =& $mform->createElement('static', 'mgrade_' . $param['id'], null, get_string('mingrade', 'badges'));
|
||||
$parameter[] =& $mform->createElement('text', 'grade_' . $param['id'], '', array('size' => '5'));
|
||||
$mform->setType('grade_' . $param['id'], PARAM_INT);
|
||||
}
|
||||
|
||||
if (in_array('bydate', $this->optional_params)) {
|
||||
|
@ -119,6 +119,7 @@ class award_criteria_course extends award_criteria {
|
||||
$parameter[] =& $mform->createElement('text', 'grade_' . $param['course'], '', array('size' => '5'));
|
||||
$parameter[] =& $mform->createElement('static', 'complby_' . $param['course'], null, get_string('bydate', 'badges'));
|
||||
$parameter[] =& $mform->createElement('date_selector', 'bydate_' . $param['course'], '', array('optional' => true));
|
||||
$mform->setType('grade_' . $param['course'], PARAM_INT);
|
||||
$mform->addGroup($parameter, 'param_' . $param['course'], '', array(' '), false);
|
||||
|
||||
$mform->disabledIf('bydate_' . $param['course'] . '[day]', 'bydate_' . $param['course'] . '[enabled]', 'notchecked');
|
||||
|
Loading…
x
Reference in New Issue
Block a user