]> git.mjollnir.org Git - moodle.git/commitdiff
replacing round() with number_format (for a number betweem 0-100), because round...
authortoyomoyo <toyomoyo>
Fri, 17 Aug 2007 06:28:12 +0000 (06:28 +0000)
committertoyomoyo <toyomoyo>
Fri, 17 Aug 2007 06:28:12 +0000 (06:28 +0000)
grade/report/grader/lib.php

index 7a62425784a11d55139ff35b88c212548ac170de..df24783972ba6880ae2749be52ec6407abc47079 100644 (file)
@@ -866,14 +866,13 @@ class grade_report_grader extends grade_report {
                         $rawvalue = $scaleval;
                     } else {
                         $gradeval = format_float($sum/$count_array[$item->id], $decimalpoints);
-
-                        $gradehtml = round($gradeval, $decimalpoints);
+                        $gradehtml = $gradeval;
                         $rawvalue = $gradeval;
                     }
 
                     if ($displaytype == GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE) {
                         $gradeval = grade_grade::standardise_score($rawvalue, $item->grademin, $item->grademax, 0, 100);
-                        $gradehtml = round($gradeval, $decimalpoints) . '%';
+                        $gradehtml = number_format($gradeval, $decimalpoints) . '%';
                     } elseif ($displaytype == GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER) {
                         $letters = grade_report::get_grade_letters();
                         $gradehtml = grade_grade::get_letter($letters, $gradeval, $item->grademin, $item->grademax);