mirror of
https://github.com/moodle/moodle.git
synced 2025-03-19 15:10:05 +01:00
replacing round() with number_format (for a number betweem 0-100), because round does not respect decimal places, e.g. round(90.50, 2) = 90.5
This commit is contained in:
parent
54c7e5e064
commit
d8c684de7e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user