mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-73128 badges: Fix warning with external badges
This commit is contained in:
parent
eab63d2cfe
commit
a0407f6d17
@ -59,7 +59,8 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||
|
||||
$name = html_writer::tag('span', $bname, array('class' => 'badge-name'));
|
||||
|
||||
$image = html_writer::empty_tag('img', ['src' => $imageurl, 'class' => 'badge-image', 'alt' => $badge->imagecaption]);
|
||||
$imagecaption = $badge->imagecaption ?? '';
|
||||
$image = html_writer::empty_tag('img', ['src' => $imageurl, 'class' => 'badge-image', 'alt' => $imagecaption]);
|
||||
if (!empty($badge->dateexpire) && $badge->dateexpire < time()) {
|
||||
$image .= $this->output->pix_icon('i/expired',
|
||||
get_string('expireddate', 'badges', userdate($badge->dateexpire)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user