Skip to content

Commit

Permalink
MDL-78889 gradereport_user: Fix pass/fail icon for totals with hidden…
Browse files Browse the repository at this point in the history
… items

When category total has grade to pass set it, pass fail icon was shown
even though the category total grade value was hidden.
  • Loading branch information
ilyatregubov committed Apr 26, 2024
1 parent 6a1fcb3 commit 8ff666e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grade/report/user/classes/report/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ private function fill_table_recursive(array &$element) {
$gradestatusclass = '';
$gradepassicon = '';
$ispassinggrade = $gradegrade->is_passed($gradegrade->grade_item);
if (!is_null($ispassinggrade)) {
if (!is_null($gradeval) && !is_null($ispassinggrade)) {
$gradestatusclass = $ispassinggrade ? 'gradepass' : 'gradefail';
if ($ispassinggrade) {
$gradepassicon = $OUTPUT->pix_icon(
Expand Down

0 comments on commit 8ff666e

Please sign in to comment.