Skip to content

Commit

Permalink
MDL-23534 Added setting to set the site pages node to the sites short…
Browse files Browse the repository at this point in the history
…name if desired
  • Loading branch information
Sam Hemelryk committed Sep 12, 2011
1 parent 5d2db8a commit 016ba63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
$temp->add(new admin_setting_configcheckbox('navshowallcourses', get_string('navshowallcourses', 'admin'), get_string('confignavshowallcourses', 'admin'), 0));
$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));

$ADMIN->add('appearance', $temp);

Expand Down
2 changes: 2 additions & 0 deletions lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
$string['configunzip'] = 'Indicate the location of your unzip program (Unix only, optional). If specified, this will be used to unpack zip archives on the server. If you leave this blank, then Moodle will use internal routines.';
$string['configuseblogassociations'] = 'Should users be able to organize their blog by associating entries with courses and course modules?';
$string['configuseexternalyui'] = 'Instead of using local files, use online files available on Yahoo‘s servers. WARNING: This requires an internet connection, or no AJAX will work on your site.';
$string['configusesitenameforsitepages'] = 'If enabled the site\'s shortname will be used for the site pages node in the navigation rather than the string \'Site pages\'';
$string['configusetags'] = 'Should tags functionality across the site be enabled?';
$string['configvariables'] = 'Variables';
$string['configverifychangedemail'] = 'Enables verification of changed email addresses using allowed and denied email domains settings. If this setting is disabled the domains are enforced only when creating new users.';
Expand Down Expand Up @@ -1067,6 +1068,7 @@
$string['usersupdated'] = 'Users updated';
$string['usersweakpassword'] = 'Users having a weak password';
$string['userquota'] = 'User quota';
$string['usesitenameforsitepages'] = 'Use site name for site pages';
$string['usetags'] = 'Enable tags functionality';
$string['uubulk'] = 'Select for bulk operations';
$string['uubulkall'] = 'All users';
Expand Down
4 changes: 3 additions & 1 deletion lib/navigationlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,9 @@ public function add_course(stdClass $course, $forcegeneric = false, $ismycourse
if ($issite) {
$parent = $this;
$url = null;
$shortname = get_string('sitepages');
if (empty($CFG->usesitenameforsitepages)) {
$shortname = get_string('sitepages');
}
} else if ($ismycourse) {
$parent = $this->rootnodes['mycourses'];
$url = new moodle_url('/course/view.php', array('id'=>$course->id));
Expand Down

0 comments on commit 016ba63

Please sign in to comment.