Permalink
Browse files

MDL-34866 - Make "course display" default a site configurable option

  • Loading branch information...
1 parent e6aac11 commit 5b918d0101738cd824987e1f558de69201742920 @rlorenzo rlorenzo committed Aug 13, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 admin/settings/courses.php
  2. +1 −1 course/edit_form.php
@@ -47,6 +47,11 @@
$temp->add(new admin_setting_configselect('moodlecourse/legacyfiles', new lang_string('courselegacyfiles'), new lang_string('courselegacyfiles_help'), key($choices), $choices));
}
+ $choices = array();
+ $choices[0] = new lang_string('coursedisplay_single');
+ $choices[1] = new lang_string('coursedisplay_multi');
+ $temp->add(new admin_setting_configselect('moodlecourse/coursedisplay', new lang_string('coursedisplay'), new lang_string('coursedisplay_help'), 0, $choices));
+
$temp->add(new admin_setting_heading('groups', new lang_string('groups', 'group'), ''));
$choices = array();
$choices[NOGROUPS] = new lang_string('groupsnone', 'group');
View
@@ -124,7 +124,7 @@ function definition() {
array(COURSE_DISPLAY_SINGLEPAGE => get_string('coursedisplay_single'),
COURSE_DISPLAY_MULTIPAGE => get_string('coursedisplay_multi')));
$mform->addHelpButton('coursedisplay', 'coursedisplay');
- $mform->setDefault('coursedisplay', COURSE_DISPLAY_SINGLEPAGE);
+ $mform->setDefault('coursedisplay', $courseconfig->coursedisplay);
for ($i = 0; $i <= $courseconfig->maxsections; $i++) {
$sectionmenu[$i] = "$i";

0 comments on commit 5b918d0

Please sign in to comment.