mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-49819 profile: Move email to top and interests to lower location
This commit is contained in:
parent
87223ef792
commit
08cb34a5a6
1 changed files with 15 additions and 15 deletions
|
@ -144,13 +144,14 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user,
|
|||
$tree->add_node($node);
|
||||
}
|
||||
|
||||
// Printing tagged interests. We want this only for full profile.
|
||||
if (!empty($CFG->usetags) && empty($course)) {
|
||||
if ($interests = tag_get_tags_csv('user', $user->id) ) {
|
||||
$node = new core_user\output\myprofile\node('contact', 'interests', get_string('interests'), null, null, $interests);
|
||||
if (isset($identityfields['email']) and ($iscurrentuser
|
||||
or $user->maildisplay == 1
|
||||
or has_capability('moodle/course:useremail', $usercontext)
|
||||
or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER)))) {
|
||||
$node = new core_user\output\myprofile\node('contact', 'email', get_string('email'), null, null,
|
||||
obfuscate_mailto($user->email, ''));
|
||||
$tree->add_node($node);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($hiddenfields['country']) && $user->country) {
|
||||
$node = new core_user\output\myprofile\node('contact', 'country', get_string('country'), null, null,
|
||||
|
@ -196,15 +197,6 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user,
|
|||
$tree->add_node($node);
|
||||
}
|
||||
|
||||
if (isset($identityfields['email']) and ($iscurrentuser
|
||||
or $user->maildisplay == 1
|
||||
or has_capability('moodle/course:useremail', $usercontext)
|
||||
or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER)))) {
|
||||
$node = new core_user\output\myprofile\node('contact', 'email', get_string('email'), null, null,
|
||||
obfuscate_mailto($user->email, ''));
|
||||
$tree->add_node($node);
|
||||
}
|
||||
|
||||
if ($user->url && !isset($hiddenfields['webpage'])) {
|
||||
$url = $user->url;
|
||||
if (strpos($user->url, '://') === false) {
|
||||
|
@ -215,6 +207,14 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user,
|
|||
$tree->add_node($node);
|
||||
}
|
||||
|
||||
// Printing tagged interests. We want this only for full profile.
|
||||
if (!empty($CFG->usetags) && empty($course)) {
|
||||
if ($interests = tag_get_tags_csv('user', $user->id) ) {
|
||||
$node = new core_user\output\myprofile\node('contact', 'interests', get_string('interests'), null, null, $interests);
|
||||
$tree->add_node($node);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($hiddenfields['mycourses'])) {
|
||||
$showallcourses = optional_param('showallcourses', 0, PARAM_INT);
|
||||
if ($mycourses = enrol_get_all_users_courses($user->id, true, null, 'visible DESC, sortorder ASC')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue