mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-34985 gradebook Fixing issue where default parent in Full View Add Category could be inconsistent.
Turns out the correct default was already computed, but was not being applied to the setting.
This commit is contained in:
parent
c92d6f417c
commit
13f87cb21e
@ -225,7 +225,7 @@ class edit_category_form extends moodleform {
|
||||
$mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades'));
|
||||
|
||||
$options = array();
|
||||
$default = '';
|
||||
$default = -1;
|
||||
$categories = grade_category::fetch_all(array('courseid'=>$COURSE->id));
|
||||
|
||||
foreach ($categories as $cat) {
|
||||
@ -238,6 +238,7 @@ class edit_category_form extends moodleform {
|
||||
|
||||
if (count($categories) > 1) {
|
||||
$mform->addElement('select', 'parentcategory', get_string('parentcategory', 'grades'), $options);
|
||||
$mform->setDefault('parentcategory', $default);
|
||||
$mform->addElement('static', 'currentparentaggregation', get_string('currentparentaggregation', 'grades'));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user