Commit 9e1da417 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Merge branch 'MDL-63961-master' of git://github.com/sarjona/moodle

parents 1fa9fe25 49c5b85e
......@@ -41,7 +41,7 @@ if ($badge->status != BADGE_STATUS_INACTIVE) {
} else {
$context = context_course::instance($badge->courseid);
}
$urlimage = moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/', 'f1')->out(false);
$urlimage = moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/', 'f3')->out(false);
$url = new moodle_url('/badges/badge_json.php', array('id' => $badge->id));
......@@ -52,7 +52,7 @@ if ($badge->status != BADGE_STATUS_INACTIVE) {
$badge->imageauthorurl ||
$badge->imagecaption) {
$urlimage = moodle_url::make_pluginfile_url($context->id,
'badges', 'badgeimage', $badge->id, '/', 'f1')->out(false);
'badges', 'badgeimage', $badge->id, '/', 'f3')->out(false);
$json['image'] = array();
$json['image']['id'] = $urlimage;
if ($badge->imageauthorname || $badge->imageauthoremail || $badge->imageauthorurl) {
......
......@@ -376,7 +376,7 @@ class core_badges_assertion {
$this->_data->imageauthorurl ||
$this->_data->imagecaption) {
$storage = get_file_storage();
$imagefile = $storage->get_file($context->id, 'badges', 'badgeimage', $this->_data->id, '/', 'f1.png');
$imagefile = $storage->get_file($context->id, 'badges', 'badgeimage', $this->_data->id, '/', 'f3.png');
if ($imagefile) {
$imagedata = base64_encode($imagefile->get_content());
} else {
......
......@@ -289,7 +289,7 @@ class badge {
// Copy badge image.
$fs = get_file_storage();
if ($file = $fs->get_file($this->get_context()->id, 'badges', 'badgeimage', $this->id, '/', 'f1.png')) {
if ($file = $fs->get_file($this->get_context()->id, 'badges', 'badgeimage', $this->id, '/', 'f3.png')) {
if ($imagefile = $file->copy_content_to_temp()) {
badges_process_badge_image($newbadge, $imagefile);
}
......
......@@ -282,7 +282,7 @@ class user_badge_exporter extends exporter {
$values = array(
'badgeurl' => moodle_url::make_webservice_pluginfile_url($context->id, 'badges', 'badgeimage', $this->data->id, '/',
'f1')->out(false),
'f3')->out(false),
'alignment' => array(),
'relatedbadges' => array(),
);
......
......@@ -39,7 +39,7 @@ class core_badges_renderer extends plugin_renderer_base {
if (!$external) {
$context = ($badge->type == BADGE_TYPE_SITE) ? context_system::instance() : context_course::instance($badge->courseid);
$bname = $badge->name;
$imageurl = moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/', 'f1', false);
$imageurl = moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/', 'f3', false);
} else {
$bname = '';
$imageurl = '';
......
......@@ -160,7 +160,7 @@ class core_badges_external_testcase extends externallib_advanced_testcase {
foreach ($badges as $badge) {
$context = ($badge->type == BADGE_TYPE_SITE) ? context_system::instance() : context_course::instance($badge->courseid);
$badge->badgeurl = moodle_url::make_webservice_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/',
'f1')->out(false);
'f3')->out(false);
// Get the endorsement, alignments and related badges.
$badgeinstance = new badge($badge->id);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment