mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Some fixes to make preferences work correctly (if not set then they are 0) and so now ranges and averages show correctly on grader report when these are set to defaults in preferences MDL-11618
This commit is contained in:
parent
323ccc26b6
commit
4354a3e563
@ -908,7 +908,8 @@ class grade_report_grader extends grade_report {
|
||||
$displaytype = GRADE_DISPLAY_TYPE_REAL;
|
||||
|
||||
} else if ($averagesdisplaytype == GRADE_REPORT_PREFERENCE_DEFAULT
|
||||
or $averagesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT) {
|
||||
|| $averagesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT
|
||||
|| $averagesdisplaytype == 0) {
|
||||
$displaytype = $item->get_displaytype();
|
||||
|
||||
} else {
|
||||
@ -917,7 +918,7 @@ class grade_report_grader extends grade_report {
|
||||
|
||||
// Override grade_item setting if a display preference (not inherit) was set for the averages
|
||||
if ($averagesdecimalpoints == GRADE_REPORT_PREFERENCE_DEFAULT
|
||||
or $averagesdecimalpoints == GRADE_REPORT_PREFERENCE_INHERIT) {
|
||||
|| $averagesdecimalpoints == GRADE_REPORT_PREFERENCE_INHERIT) {
|
||||
$decimalpoints = $item->get_decimals();
|
||||
|
||||
} else {
|
||||
@ -967,7 +968,8 @@ class grade_report_grader extends grade_report {
|
||||
$displaytype = GRADE_DISPLAY_TYPE_REAL;
|
||||
|
||||
} else if ($rangesdisplaytype == GRADE_REPORT_PREFERENCE_DEFAULT
|
||||
or $rangesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT) {
|
||||
|| $rangesdisplaytype == GRADE_REPORT_PREFERENCE_INHERIT
|
||||
|| $rangesdisplaytype == 0 ) {
|
||||
$displaytype = $item->get_displaytype();
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user