MDL-82233 badges: Display awarded users only when it applies

The message with the number of uses who have awarded a badge
were displayed always (even when the badge was disabled).
This commit is contained in:
Sara Arjona
2024-06-18 16:06:41 +02:00
parent a585bda18f
commit 2056d3d629
+1 -1
View File
@@ -75,7 +75,7 @@ echo $OUTPUT->heading(print_badge_image($badge, $context, 'small') . ' ' . $badg
if ($awards == 'cron') {
echo $OUTPUT->notification(get_string('awardoncron', 'badges'), 'notifysuccess');
} else if ($awards != 0) {
} else if ((int)$awards > 0) {
echo $OUTPUT->notification(get_string('numawardstat', 'badges', $awards), 'notifysuccess');
}
echo $output->print_badge_status_box($badge);