navigation MDL-20651 Changed setting from hide to show

This commit is contained in:
Sam Hemelryk 2009-11-05 09:31:55 +00:00
parent cf9235d3a3
commit 8958174c48
4 changed files with 7 additions and 7 deletions

View File

@ -67,7 +67,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// Navigation settings // Navigation settings
$temp = new admin_settingpage('navigation', get_string('navigation')); $temp = new admin_settingpage('navigation', get_string('navigation'));
$temp->add(new admin_setting_configcheckbox('navhidecategories', get_string('navhidecategories', 'admin'), get_string('confignavhidecategories', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('navshowcategories', get_string('navshowcategories', 'admin'), get_string('confignavshowcategories', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navshowallcourses', get_string('navshowallcourses', 'admin'), get_string('confignavshowallcourses', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('navshowallcourses', get_string('navshowallcourses', 'admin'), get_string('confignavshowallcourses', 'admin'), 0));
$ADMIN->add('appearance', $temp); $ADMIN->add('appearance', $temp);

View File

@ -127,7 +127,7 @@ class block_global_navigation_tree extends block_tree {
} }
// Load the my courses branch if the user has selected to // Load the my courses branch if the user has selected to
if (!empty($CFG->navhidecategories)) { if (isset($CFG->navshowcategories) && empty($CFG->navshowcategories)) {
$this->page->navigation->collapse_course_categories(); $this->page->navigation->collapse_course_categories();
} }

View File

@ -241,7 +241,7 @@ $string['configminpasswordupper'] = 'Passwords must have at least these many upp
$string['condifmodeditdefaults'] = 'The values you set here define the default values that are used in the activity settings form when you create a new activity. You can also configure which activity settings are considered advanced.'; $string['condifmodeditdefaults'] = 'The values you set here define the default values that are used in the activity settings form when you create a new activity. You can also configure which activity settings are considered advanced.';
$string['configmycoursesperpage'] = 'Maximum number of courses to display in any list of a user\'s own courses'; $string['configmycoursesperpage'] = 'Maximum number of courses to display in any list of a user\'s own courses';
$string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site navigation with /my'; $string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site navigation with /my';
$string['confignavhidecategories'] = 'Do not show course categories in the navigation bar or navigation blocks'; $string['confignavshowcategories'] = 'Show course categories in the navigation bar and navigation blocks';
$string['confignavshowallcourses'] = 'Setting this ensures that all courses a user is registered in are shown on the navigation at all times. By default once a user browses to a course only that course is shown on the navigation.'; $string['confignavshowallcourses'] = 'Setting this ensures that all courses a user is registered in are shown on the navigation at all times. By default once a user browses to a course only that course is shown on the navigation.';
$string['confignodefaultuserrolelists'] = 'This setting prevents all users from being returned from the database from deprecated calls of get_course_user, etc., for the site course if the default role provides that access. Check this, if you suffer a performance hit.'; $string['confignodefaultuserrolelists'] = 'This setting prevents all users from being returned from the database from deprecated calls of get_course_user, etc., for the site course if the default role provides that access. Check this, if you suffer a performance hit.';
$string['confignonmetacoursesyncroleids'] = 'By default all role assignments from child courses are synchronised to metacourses. Roles that are selected here will not be included in the synchronisation process.'; $string['confignonmetacoursesyncroleids'] = 'By default all role assignments from child courses are synchronised to metacourses. Roles that are selected here will not be included in the synchronisation process.';
@ -647,7 +647,7 @@ $string['mysql416required'] = 'MySQL 4.1.16 is the minimum version required for
$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 $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.<br /><br /> is behaving as you want it.<br /><br />
You should also "Shift-Refresh" your browser to load the new styles, otherwise the new blocks will not work correctly.'; You should also "Shift-Refresh" your browser to load the new styles, otherwise the new blocks will not work correctly.';
$string['navhidecategories'] = 'Hide course categories'; $string['navshowcategories'] = 'Show course categories';
$string['navshowallcourses'] = 'Show all users courses'; $string['navshowallcourses'] = 'Show all users courses';
$string['nobookmarksforuser'] = 'You do not have any bookmarks.'; $string['nobookmarksforuser'] = 'You do not have any bookmarks.';
$string['nochanges'] = 'No changes'; $string['nochanges'] = 'No changes';

View File

@ -2261,9 +2261,9 @@ class navbar extends navigation_node {
$oldaction = $child->action; $oldaction = $child->action;
$child->action = null; $child->action = null;
} }
if (empty($CFG->navhidecategories) || $child->type !== navigation_node::TYPE_CATEGORY) { if ($child->type !== navigation_node::TYPE_CATEGORY || !isset($CFG->navshowcategories) || !empty($CFG->navshowcategories)) {
// Now display the node // Now display the node
$output .= '<li>'.$separator.' '.$child->content(true).'</li>'; $output .= '<li>'.$separator.' '.$child->content(true).'</li>';
} }
if (isset($oldaction)) { if (isset($oldaction)) {
$child->action = $oldaction; $child->action = $oldaction;