diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index 36a287b3b2deb..1646cab08f2f5 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -93,6 +93,7 @@ $temp->add(new admin_setting_configtext('navcourselimit',get_string('navcourselimit','admin'),get_string('confignavcourselimit', 'admin'),20,PARAM_INT)); $temp->add(new admin_setting_configcheckbox('navlinkcoursesections', get_string('navlinkcoursesections', 'admin'), get_string('navlinkcoursesections_help', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('usesitenameforsitepages', get_string('usesitenameforsitepages', 'admin'), get_string('configusesitenameforsitepages', 'admin'), 0)); + $temp->add(new admin_setting_configcheckbox('navadduserpostslinks', get_string('navadduserpostslinks', 'admin'), get_string('navadduserpostslinks_help', 'admin'), 1)); $ADMIN->add('appearance', $temp); diff --git a/lang/en/admin.php b/lang/en/admin.php index 683da5c412663..03c0ed706c83e 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -684,6 +684,8 @@ $string['mypagelocked'] = 'Lock default page'; $string['mysql416bypassed'] = 'However, if your site is using iso-8859-1 (latin) languages ONLY, you may continue using your currently installed MySQL 4.1.12 (or higher).'; $string['mysql416required'] = 'MySQL 4.1.16 is the minimum version required for Moodle 1.6 in order to guarantee that all data can be converted to UTF-8 in the future.'; +$string['navadduserpostslinks'] = 'Add links to view user posts'; +$string['navadduserpostslinks_help'] = 'If enabled two links will be added to each user in the navigation to view discussions the user has started and posts the user has made in forums throughout the site or in specific courses.'; $string['navigationupgrade'] = 'This upgrade introduces two new navigation blocks that will replace these blocks: Administration, Courses, Activities and Participants. If you had set any special permissions on those blocks you should check to make sure everything is behaving as you want it.'; $string['navcourselimit'] = 'Course limit'; $string['navlinkcoursesections'] = 'Link course sections'; diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 0c88ad06a4acc..b8d30790261a3 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -1893,12 +1893,14 @@ protected function load_for_user($user=null, $forceforcontext=false) { } } - // 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)) { diff --git a/version.php b/version.php index f9757d8e7e94e..7fbde6fe6a91d 100644 --- a/version.php +++ b/version.php @@ -31,7 +31,7 @@ -$version = 2011100700.01; // YYYYMMDD = weekly release date of this DEV branch +$version = 2011101000.00; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes