mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-58165 navigation: Add node key to private files navigation node
This commit is contained in:
parent
590292d48e
commit
27456a6422
@ -2339,7 +2339,7 @@ class global_navigation extends navigation_node {
|
||||
// This link doesn't have a unique display for course context so only display it under the user's profile.
|
||||
if ($issitecourse && $iscurrentuser && has_capability('moodle/user:manageownfiles', $usercontext)) {
|
||||
$url = new moodle_url('/user/files.php');
|
||||
$usernode->add(get_string('privatefiles'), $url, self::TYPE_SETTING);
|
||||
$usernode->add(get_string('privatefiles'), $url, self::TYPE_SETTING, null, 'privatefiles');
|
||||
}
|
||||
|
||||
// Add a node to view the users notes if permitted.
|
||||
@ -2775,7 +2775,7 @@ class global_navigation extends navigation_node {
|
||||
$usercontext = context_user::instance($USER->id);
|
||||
if (has_capability('moodle/user:manageownfiles', $usercontext)) {
|
||||
$url = new moodle_url('/user/files.php');
|
||||
$node = $coursenode->add(get_string('privatefiles'), $url, self::TYPE_SETTING);
|
||||
$node = $coursenode->add(get_string('privatefiles'), $url, self::TYPE_SETTING, null, 'privatefiles');
|
||||
$node->display = false;
|
||||
$node->showinflatnavigation = true;
|
||||
}
|
||||
@ -4677,7 +4677,7 @@ class settings_navigation extends navigation_node {
|
||||
// This link doesn't have a unique display for course context so only display it under the user's profile.
|
||||
if ($issitecourse && $iscurrentuser && has_capability('moodle/user:manageownfiles', $usercontext)) {
|
||||
$url = new moodle_url('/user/files.php');
|
||||
$dashboard->add(get_string('privatefiles'), $url, self::TYPE_SETTING);
|
||||
$dashboard->add(get_string('privatefiles'), $url, self::TYPE_SETTING, null, 'privatefiles');
|
||||
}
|
||||
|
||||
// Add a node to view the users notes if permitted.
|
||||
|
Loading…
x
Reference in New Issue
Block a user