Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
a0407f6d
Commit
a0407f6d
authored
Nov 19, 2021
by
Sara Arjona
Browse files
MDL-73128 badges: Fix warning with external badges
parent
eab63d2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
badges/renderer.php
View file @
a0407f6d
...
...
@@ -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
)),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment