MDL-27058 navigation: Added a setting to control whether user forum links are added
This commit is contained in:
@@ -1893,12 +1893,14 @@ class global_navigation extends navigation_node {
|
||||
}
|
||||
}
|
||||
|
||||
// Add nodes for forum posts and discussions if the user can view either or both
|
||||
// There are no capability checks here as the content of the page is based
|
||||
// purely on the forums the current user has access too.
|
||||
$forumtab = $usernode->add(get_string('forumposts', 'forum'));
|
||||
$forumtab->add(get_string('posts', 'forum'), new moodle_url('/mod/forum/user.php', $baseargs));
|
||||
$forumtab->add(get_string('discussions', 'forum'), new moodle_url('/mod/forum/user.php', array_merge($baseargs, array('mode'=>'discussions'))));
|
||||
if (!empty($CFG->navadduserpostslinks)) {
|
||||
// Add nodes for forum posts and discussions if the user can view either or both
|
||||
// There are no capability checks here as the content of the page is based
|
||||
// purely on the forums the current user has access too.
|
||||
$forumtab = $usernode->add(get_string('forumposts', 'forum'));
|
||||
$forumtab->add(get_string('posts', 'forum'), new moodle_url('/mod/forum/user.php', $baseargs));
|
||||
$forumtab->add(get_string('discussions', 'forum'), new moodle_url('/mod/forum/user.php', array_merge($baseargs, array('mode'=>'discussions'))));
|
||||
}
|
||||
|
||||
// Add blog nodes
|
||||
if (!empty($CFG->bloglevel)) {
|
||||
|
||||
Reference in New Issue
Block a user