Skip to content
Permalink
Browse files

MDL-34985 gradebook Fixing issue where default parent in Full View Ad…

…d Category could be inconsistent.

Turns out the correct default was already computed, but was not being applied to the setting.
  • Loading branch information...
merrill-oakland committed Aug 20, 2012
1 parent 7033316 commit 2d0a11ee947523b16a4ddb480c50d52fbeb4d637
Showing with 2 additions and 1 deletion.
  1. +2 −1 grade/edit/tree/category_form.php
@@ -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 2d0a11e

Please sign in to comment.
You can’t perform that action at this time.