MDL-10346, adding a row for grade range between headers and grades

This commit is contained in:
toyomoyo 2007-07-09 05:49:30 +00:00
parent 95b31d202b
commit f87b1451c3

View File

@ -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;
}