MDL-78889 gradereport_user: Fix pass/fail icon for totals

When the category has a 'grade to pass' set, the pass/fail icon
was displayed even when the category total grade values was hidden.
This commit is contained in:
Ilya Tregubov
2024-04-29 14:44:44 +08:00
parent 840d58af5e
commit fb619b068d
+1 -1
View File
@@ -666,7 +666,7 @@ class user extends grade_report {
$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(