mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-19364 Create new category in tree doesn't check for advanced grade_item fields, thanks Daniel Neis
This commit is contained in:
parent
51d1bdba90
commit
2be0078162
@ -249,6 +249,17 @@ class edit_category_form extends moodleform {
|
||||
$gpr = $this->_customdata['gpr'];
|
||||
$gpr->add_mform_elements($mform);
|
||||
|
||||
/// mark advanced according to site settings
|
||||
if (isset($CFG->grade_item_advanced)) {
|
||||
$advanced = explode(',', $CFG->grade_item_advanced);
|
||||
foreach ($advanced as $el) {
|
||||
$el = 'grade_item_'.$el;
|
||||
if ($mform->elementExists($el)) {
|
||||
$mform->setAdvanced($el);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// buttons
|
||||
$this->add_action_buttons();
|
||||
|
Loading…
x
Reference in New Issue
Block a user