mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-73128 badges: Fix warning with external badges
This commit is contained in:
parent
eab63d2cfe
commit
a0407f6d17
1 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,8 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||||
|
|
||||||
$name = html_writer::tag('span', $bname, array('class' => 'badge-name'));
|
$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()) {
|
if (!empty($badge->dateexpire) && $badge->dateexpire < time()) {
|
||||||
$image .= $this->output->pix_icon('i/expired',
|
$image .= $this->output->pix_icon('i/expired',
|
||||||
get_string('expireddate', 'badges', userdate($badge->dateexpire)),
|
get_string('expireddate', 'badges', userdate($badge->dateexpire)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue