mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-13579 Corrected a bug in default value selection for the grader report preferences form. Merging from MOODLE_19_STABLE
This commit is contained in:
parent
73c32e86cf
commit
05766b50c7
@ -114,7 +114,7 @@ class grade_report_grader extends grade_report {
|
||||
|
||||
// if user report preference set or site report setting set use it, otherwise use course or site setting
|
||||
$switch = $this->get_pref('aggregationposition');
|
||||
if (empty($switch)) {
|
||||
if ($switch == '') {
|
||||
$switch = grade_get_setting($this->courseid, 'aggregationposition', $CFG->grade_aggregationposition);
|
||||
}
|
||||
|
||||
|
@ -153,8 +153,14 @@ class grader_report_preferences_form extends moodleform {
|
||||
$type = 'select';
|
||||
// MDL-11478
|
||||
// get default aggregationposition from grade_settings
|
||||
$course_value = grade_get_setting($course->id, $pref, $CFG->{$full_pref});
|
||||
|
||||
if ($pref == 'aggregationposition') {
|
||||
$default = $options[grade_get_setting($course->id, $pref, $CFG->{$full_pref})];
|
||||
if (!empty($options[$course_value])) {
|
||||
$default = $options[$course_value];
|
||||
} else {
|
||||
$default = $options[$CFG->grade_aggregationposition];
|
||||
}
|
||||
} elseif (isset($options[$CFG->{$full_pref}])) {
|
||||
$default = $options[$CFG->{$full_pref}];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user