mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch '28067-29' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
436d1a1787
@ -2221,6 +2221,8 @@ class global_navigation extends navigation_node {
|
||||
}
|
||||
}
|
||||
|
||||
// Add the messages link.
|
||||
// It is context based so can appear in "My profile" and in course participants information.
|
||||
if (!empty($CFG->messaging)) {
|
||||
$messageargs = array('user1' => $USER->id);
|
||||
if ($USER->id != $user->id) {
|
||||
@ -2233,13 +2235,15 @@ class global_navigation extends navigation_node {
|
||||
$usernode->add(get_string('messages', 'message'), $url, self::TYPE_SETTING, null, 'messages');
|
||||
}
|
||||
|
||||
if ($iscurrentuser && has_capability('moodle/user:manageownfiles', context_user::instance($USER->id))) {
|
||||
// Add the "My private files" link.
|
||||
// This link doesn't have a unique display for course context so only display it under "My profile".
|
||||
if ($issitecourse && $iscurrentuser && has_capability('moodle/user:manageownfiles', $usercontext)) {
|
||||
$url = new moodle_url('/user/files.php');
|
||||
$usernode->add(get_string('myfiles'), $url, self::TYPE_SETTING);
|
||||
}
|
||||
|
||||
if (!empty($CFG->enablebadges) && $iscurrentuser &&
|
||||
has_capability('moodle/badges:manageownbadges', context_user::instance($USER->id))) {
|
||||
has_capability('moodle/badges:manageownbadges', $usercontext)) {
|
||||
$url = new moodle_url('/badges/mybadges.php');
|
||||
$usernode->add(get_string('mybadges', 'badges'), $url, self::TYPE_SETTING);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user