mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
Merge branch '26226-48304-29' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
13e0300961
@ -144,6 +144,7 @@ mybadges,badges|/badges/mybadges.php|award',
|
||||
$temp->add(new admin_setting_configtext('navcourselimit',new lang_string('navcourselimit','admin'),new lang_string('confignavcourselimit', 'admin'),20,PARAM_INT));
|
||||
$temp->add(new admin_setting_configcheckbox('usesitenameforsitepages', new lang_string('usesitenameforsitepages', 'admin'), new lang_string('configusesitenameforsitepages', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('linkadmincategories', new lang_string('linkadmincategories', 'admin'), new lang_string('linkadmincategories_help', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('linkcoursesections', new lang_string('linkcoursesections', 'admin'), new lang_string('linkcoursesections_help', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('navshowfrontpagemods', new lang_string('navshowfrontpagemods', 'admin'), new lang_string('navshowfrontpagemods_help', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configcheckbox('navadduserpostslinks', new lang_string('navadduserpostslinks', 'admin'), new lang_string('navadduserpostslinks_help', 'admin'), 1));
|
||||
|
||||
|
@ -395,6 +395,7 @@ abstract class format_base {
|
||||
* @return null|moodle_url
|
||||
*/
|
||||
public function get_view_url($section, $options = array()) {
|
||||
global $CFG;
|
||||
$course = $this->get_course();
|
||||
$url = new moodle_url('/course/view.php', array('id' => $course->id));
|
||||
|
||||
@ -405,7 +406,7 @@ abstract class format_base {
|
||||
} else {
|
||||
$sectionno = $section;
|
||||
}
|
||||
if (!empty($options['navigation']) && $sectionno !== null) {
|
||||
if (empty($CFG->linkcoursesections) && !empty($options['navigation']) && $sectionno !== null) {
|
||||
// by default assume that sections are never displayed on separate pages
|
||||
return null;
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ class format_topics extends format_base {
|
||||
* @return null|moodle_url
|
||||
*/
|
||||
public function get_view_url($section, $options = array()) {
|
||||
global $CFG;
|
||||
$course = $this->get_course();
|
||||
$url = new moodle_url('/course/view.php', array('id' => $course->id));
|
||||
|
||||
@ -101,7 +102,7 @@ class format_topics extends format_base {
|
||||
if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {
|
||||
$url->param('section', $sectionno);
|
||||
} else {
|
||||
if (!empty($options['navigation'])) {
|
||||
if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
|
||||
return null;
|
||||
}
|
||||
$url->set_anchor('section-'.$sectionno);
|
||||
|
@ -82,6 +82,7 @@ class format_weeks extends format_base {
|
||||
* @return null|moodle_url
|
||||
*/
|
||||
public function get_view_url($section, $options = array()) {
|
||||
global $CFG;
|
||||
$course = $this->get_course();
|
||||
$url = new moodle_url('/course/view.php', array('id' => $course->id));
|
||||
|
||||
@ -108,7 +109,7 @@ class format_weeks extends format_base {
|
||||
if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {
|
||||
$url->param('section', $sectionno);
|
||||
} else {
|
||||
if (!empty($options['navigation'])) {
|
||||
if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
|
||||
return null;
|
||||
}
|
||||
$url->set_anchor('section-'.$sectionno);
|
||||
|
@ -617,6 +617,8 @@ $string['legacyfilesinnewcourses_help'] = 'By default, legacy course files areas
|
||||
$string['licensesettings'] = 'Licence settings';
|
||||
$string['linkadmincategories'] = 'Link admin categories';
|
||||
$string['linkadmincategories_help'] = 'If enabled admin setting categories will be displayed as links in the navigation and will lead to the admin category pages.';
|
||||
$string['linkcoursesections'] = 'Always link course sections';
|
||||
$string['linkcoursesections_help'] = 'Always try to provide a link for course sections. Course sections are usually only shown as links if the course format displays a single section per page. If this setting is enabled a link will always be provided.';
|
||||
$string['loading'] = 'Loading';
|
||||
$string['localetext'] = 'Sitewide locale';
|
||||
$string['localstringcustomization'] = 'Local string customization';
|
||||
|
Loading…
x
Reference in New Issue
Block a user