# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: moodle/mod/quiz/report/reportlib.php --- moodle/mod/quiz/report/reportlib.php Base (1.1.2.9) +++ moodle/mod/quiz/report/reportlib.php Locally Modified (Based On 1.1.2.9) @@ -122,8 +122,19 @@ //need to create array elements with values 0 at indexes where there is no element $data = $data + array_fill(0, $bands, 0); ksort($data); + + //If the number of band is an integer then the last band will be not displayed. + //In this case we need to move all last band grades (in fact the highest grade) + //in the previous band. + if ($bands == intval($bands)) { + $maxGradeTotal = $data[$bands]; + $data[$bands-1] += $maxGradeTotal; + $data[$bands] = 0; + } + return $data; } + function quiz_report_highlighting_grading_method($quiz, $qmsubselect, $qmfilter){ if ($quiz->attempts == 1) {//only one attempt allowed on this quiz return "

".get_string('onlyoneattemptallowed', "quiz_overview")."

";