Some fixes to make preferences work correctly (if not set then they are 0) and so...
authormoodler <moodler>
Mon, 8 Oct 2007 07:26:29 +0000 (07:26 +0000)
committermoodler <moodler>
Mon, 8 Oct 2007 07:26:29 +0000 (07:26 +0000)
grade/report/grader/lib.php

index 20f24cae0aee1373b98c355fa5fdb01bc9405ddc..d1d7a062862a229e84f7414edb88f4af7b5b077f 100644 (file)
@@ -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 {