Skip to content

Commit

Permalink
MDL-34985 gradebook Fixing issue where default parent in Full View Ad…
Browse files Browse the repository at this point in the history
…d Category could be inconsistent.

Turns out the correct default was already computed, but was not being applied to the setting.
ericmerrill committed Aug 20, 2012

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c92d6f4 commit 13f87cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grade/edit/tree/category_form.php
Original file line number Diff line number Diff line change
@@ -225,7 +225,7 @@ function definition() {
$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 @@ function definition() {

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'));
}

0 comments on commit 13f87cb

Please sign in to comment.