Merge branch 'MDL-64229_master' of git://github.com/markn86/moodle

This commit is contained in:
Jake Dallimore 2018-12-19 11:37:15 +08:00
commit 57e94e365e
5 changed files with 17 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -87,6 +87,7 @@ define(['jquery'], function($) {
return {
id: member.id,
fullname: member.fullname,
profileurl: member.profileurl,
profileimageurl: member.profileimageurl,
profileimageurlsmall: member.profileimageurlsmall,
isonline: member.isonline,

View File

@ -524,6 +524,10 @@ class helper {
$data->id = $member->id;
$data->fullname = fullname($member);
// Create the URL for their profile.
$profileurl = new \moodle_url('/user/profile.php', ['id' => $member->id]);
$data->profileurl = $profileurl->out(false);
// Set the user picture data.
$userpicture = new \user_picture($member);
$userpicture->size = 1; // Size f1.

View File

@ -1147,6 +1147,7 @@ class core_message_external extends external_api {
$result = [
'id' => new external_value(PARAM_INT, 'The user id'),
'fullname' => new external_value(PARAM_NOTAGS, 'The user\'s name'),
'profileurl' => new external_value(PARAM_URL, 'The link to the user\'s profile page'),
'profileimageurl' => new external_value(PARAM_URL, 'User picture URL'),
'profileimageurlsmall' => new external_value(PARAM_URL, 'Small user picture URL'),
'isonline' => new external_value(PARAM_BOOL, 'The user\'s online status'),

View File

@ -40,14 +40,16 @@
</a>
<div class="px-3 pb-3">
<div class="text-center">
<img
class="rounded-circle"
src="{{profileimageurl}}"
aria-hidden="true"
alt="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
title="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
style="height: 100px; width: 100px"
>
<a href="{{{profileurl}}}">
<img
class="rounded-circle"
src="{{profileimageurl}}"
aria-hidden="true"
alt="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
title="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
style="height: 100px; width: 100px"
>
</a>
</div>
<h2 class="mt-2 text-center text-truncate">{{fullname}}</h2>
<div class="px-4 mt-4">