MDL-47725 gradereport_user: Only hide grades when they were altered

The method blank_hidden_total_and_adjust_bounds() now checks for more
than just a grade change, and in that cause would hide the grade. We
added a condition to only hide the grade when it effectively changed,
not when its other properties have.
This commit is contained in:
Frederic Massart 2014-10-20 14:19:02 +08:00
parent 9b4a87f7e6
commit 263bf1a10f

View File

@ -490,8 +490,8 @@ abstract class grade_report {
array_key_exists($course_item->id, $hiding_affected['alteredgrademax']) ||
array_key_exists($course_item->id, $hiding_affected['alteredaggregationstatus']) ||
array_key_exists($course_item->id, $hiding_affected['alteredaggregationweight'])) {
if (!$this->showtotalsifcontainhidden[$courseid]) {
//hide the grade
if (!$this->showtotalsifcontainhidden[$courseid] && array_key_exists($course_item->id, $hiding_affected['altered'])) {
// Hide the grade, but only when it has changed.
$finalgrade = null;
} else {
//use reprocessed marks that exclude hidden items