Merge branch 'MDL-63991-master' of git://github.com/crazyserver/moodle

This commit is contained in:
David Monllao 2018-11-14 11:57:57 +01:00
commit 03d9f4cda4
2 changed files with 8 additions and 5 deletions

View File

@ -63,6 +63,10 @@ $output = $PAGE->get_renderer('core', 'badges');
$msg = optional_param('msg', '', PARAM_TEXT); $msg = optional_param('msg', '', PARAM_TEXT);
$emsg = optional_param('emsg', '', PARAM_TEXT); $emsg = optional_param('emsg', '', PARAM_TEXT);
if ($msg !== '') {
$msg = get_string($msg, 'badges');
}
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading(print_badge_image($badge, $context, 'small') . ' ' . $badge->name); echo $OUTPUT->heading(print_badge_image($badge, $context, 'small') . ' ' . $badge->name);

View File

@ -150,8 +150,7 @@ class core_badges_renderer extends plugin_renderer_base {
$dl[get_string('description', 'badges')] = $badge->description; $dl[get_string('description', 'badges')] = $badge->description;
$dl[get_string('createdon', 'search')] = userdate($badge->timecreated); $dl[get_string('createdon', 'search')] = userdate($badge->timecreated);
$dl[get_string('badgeimage', 'badges')] = print_badge_image($badge, $context, 'large'); $dl[get_string('badgeimage', 'badges')] = print_badge_image($badge, $context, 'large');
$dl[get_string('imageauthorname', 'badges')] = $dl[get_string('imageauthorname', 'badges')] = $badge->imageauthorname;
html_writer::link($badge->imageauthorname, $badge->imageauthorname, array('target' => '_blank'));
$dl[get_string('imageauthoremail', 'badges')] = $dl[get_string('imageauthoremail', 'badges')] =
html_writer::tag('a', $badge->imageauthoremail, array('href' => 'mailto:' . $badge->imageauthoremail)); html_writer::tag('a', $badge->imageauthoremail, array('href' => 'mailto:' . $badge->imageauthoremail));
$dl[get_string('imageauthorurl', 'badges')] = $dl[get_string('imageauthorurl', 'badges')] =
@ -352,8 +351,7 @@ class core_badges_renderer extends plugin_renderer_base {
$dl[get_string('version', 'badges')] = $badge->version; $dl[get_string('version', 'badges')] = $badge->version;
$dl[get_string('language')] = $languages[$badge->language]; $dl[get_string('language')] = $languages[$badge->language];
$dl[get_string('description', 'badges')] = $badge->description; $dl[get_string('description', 'badges')] = $badge->description;
$dl[get_string('imageauthorname', 'badges')] = $dl[get_string('imageauthorname', 'badges')] = $badge->imageauthorname;
html_writer::link($badge->imageauthorname, $badge->imageauthorname, array('target' => '_blank'));
$dl[get_string('imageauthoremail', 'badges')] = $dl[get_string('imageauthoremail', 'badges')] =
html_writer::tag('a', $badge->imageauthoremail, array('href' => 'mailto:' . $badge->imageauthoremail)); html_writer::tag('a', $badge->imageauthoremail, array('href' => 'mailto:' . $badge->imageauthoremail));
$dl[get_string('imageauthorurl', 'badges')] = $dl[get_string('imageauthorurl', 'badges')] =
@ -1048,7 +1046,8 @@ class core_badges_renderer extends plugin_renderer_base {
$output .= $this->heading(get_string('endorsement', 'badges'), 3); $output .= $this->heading(get_string('endorsement', 'badges'), 3);
if (!empty($endorsement)) { if (!empty($endorsement)) {
$dl[get_string('issuername', 'badges')] = $endorsement->issuername; $dl[get_string('issuername', 'badges')] = $endorsement->issuername;
$dl[get_string('issueremail', 'badges')] = $endorsement->issueremail; $dl[get_string('issueremail', 'badges')] =
html_writer::tag('a', $endorsement->issueremail, array('href' => 'mailto:' . $endorsement->issueremail));
$dl[get_string('issuerurl', 'badges')] = html_writer::link($endorsement->issuerurl, $endorsement->issuerurl, $dl[get_string('issuerurl', 'badges')] = html_writer::link($endorsement->issuerurl, $endorsement->issuerurl,
array('target' => '_blank')); array('target' => '_blank'));
$dl[get_string('dateawarded', 'badges')] = date('c', $endorsement->dateissued); $dl[get_string('dateawarded', 'badges')] = date('c', $endorsement->dateissued);