Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 79e250dbdcc2ddebdf7c2816f10494ae277ff3de 1 parent 87e9331
@rlorenzo rlorenzo authored
Showing with 6 additions and 1 deletion.
  1. +5 −0 admin/settings/courses.php
  2. +1 −1  course/edit_form.php
View
5 admin/settings/courses.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
2  course/edit_form.php
@@ -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";
Please sign in to comment.
Something went wrong with that request. Please try again.