mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-10346, adding a row for grade range between headers and grades
This commit is contained in:
parent
95b31d202b
commit
f87b1451c3
@ -550,7 +550,21 @@ if ($displaytotals || 1) {
|
||||
$gradesumhtml = '';
|
||||
}
|
||||
|
||||
|
||||
// finding the ranges of each gradeitem
|
||||
|
||||
if ($showscales) {
|
||||
$scalehtml = '<tr><td>'.get_string('range','grades').'</td>';
|
||||
foreach ($items as $item) {
|
||||
$scalehtml .= '<td>'. get_grade_clean($item->grademin).'-'. get_grade_clean($item->grademax).'</td>';
|
||||
}
|
||||
$scalehtml .= '</tr>';
|
||||
} else {
|
||||
$scalehtml = '';
|
||||
}
|
||||
|
||||
$reporthtml = "<table class=\"boxaligncenter\">$headerhtml";
|
||||
$reporthtml .= $scalehtml;
|
||||
$reporthtml .= $studentshtml;
|
||||
$reporthtml .= $groupsumhtml;
|
||||
$reporthtml .= $gradesumhtml;
|
||||
@ -577,7 +591,7 @@ if ($USER->gradeediting) {
|
||||
function get_grade_clean($gradeval) {
|
||||
|
||||
if ($gradeval != 0) {
|
||||
$gradeval = trim($gradeval, ".0");
|
||||
$gradeval = rtrim(trim($gradeval, "0"), ".");
|
||||
} else {
|
||||
$gradeval = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user