mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
Merge branch 'MDL-82359-main' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
e6146bca1b
8 changed files with 125 additions and 37 deletions
|
@ -2589,16 +2589,6 @@ class global_navigation extends navigation_node {
|
|||
}
|
||||
}
|
||||
|
||||
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->enableblogs)) {
|
||||
if (!$this->cache->cached('userblogoptions'.$user->id)) {
|
||||
|
@ -5201,16 +5191,6 @@ class settings_navigation extends navigation_node {
|
|||
$profilenode = $mainpage->add(get_string('profile'), new moodle_url('/user/profile.php',
|
||||
array('id' => $user->id)), self::TYPE_SETTING, null, 'myprofile');
|
||||
|
||||
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 = $profilenode->add(get_string('forumposts', 'forum'));
|
||||
$forumtab->add(get_string('posts', 'forum'), new moodle_url('/mod/forum/user.php', $baseargs), null, 'myposts');
|
||||
$forumtab->add(get_string('discussions', 'forum'), new moodle_url('/mod/forum/user.php',
|
||||
array_merge($baseargs, array('mode' => 'discussions'))), null, 'mydiscussions');
|
||||
}
|
||||
|
||||
// Add blog nodes.
|
||||
if (!empty($CFG->enableblogs)) {
|
||||
if (!$this->cache->cached('userblogoptions'.$user->id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue