Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
838d78a
)
MDL-40162 badges: Image url breaks when slashargumets is not supported
author
Yuliya Bozhko
<yuliya.bozhko@totaralms.com>
Thu, 15 Aug 2013 23:12:12 +0000
(11:12 +1200)
committer
Yuliya Bozhko
<yuliya.bozhko@totaralms.com>
Thu, 15 Aug 2013 23:12:12 +0000
(11:12 +1200)
lib/badgeslib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/badgeslib.php
b/lib/badgeslib.php
index
c8e18af
..
4901456
100644
(file)
--- a/
lib/badgeslib.php
+++ b/
lib/badgeslib.php
@@
-1025,7
+1025,8
@@
function print_badge_image(badge $badge, stdClass $context, $size = 'small') {
$imageurl = moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/', $fsize, false);
// Appending a random parameter to image link to forse browser reload the image.
$imageurl = moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/', $fsize, false);
// Appending a random parameter to image link to forse browser reload the image.
- $attributes = array('src' => $imageurl . '?' . rand(1, 10000), 'alt' => s($badge->name), 'class' => 'activatebadge');
+ $imageurl->param('refresh', rand(1, 10000));
+ $attributes = array('src' => $imageurl, 'alt' => s($badge->name), 'class' => 'activatebadge');
return html_writer::empty_tag('img', $attributes);
}
return html_writer::empty_tag('img', $attributes);
}