Skip to content

Commit

Permalink
MDL-34866 - Make "course display" default a site configurable option
Browse files Browse the repository at this point in the history
  • Loading branch information
rlorenzo committed Aug 13, 2012
1 parent 87e9331 commit 79e250d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions admin/settings/courses.php
Expand Up @@ -47,6 +47,11 @@
$temp->add(new admin_setting_configselect('moodlecourse/legacyfiles', new lang_string('courselegacyfiles'), new lang_string('courselegacyfiles_help'), key($choices), $choices)); $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'), '')); $temp->add(new admin_setting_heading('groups', new lang_string('groups', 'group'), ''));
$choices = array(); $choices = array();
$choices[NOGROUPS] = new lang_string('groupsnone', 'group'); $choices[NOGROUPS] = new lang_string('groupsnone', 'group');
Expand Down
2 changes: 1 addition & 1 deletion course/edit_form.php
Expand Up @@ -124,7 +124,7 @@ function definition() {
array(COURSE_DISPLAY_SINGLEPAGE => get_string('coursedisplay_single'), array(COURSE_DISPLAY_SINGLEPAGE => get_string('coursedisplay_single'),
COURSE_DISPLAY_MULTIPAGE => get_string('coursedisplay_multi'))); COURSE_DISPLAY_MULTIPAGE => get_string('coursedisplay_multi')));
$mform->addHelpButton('coursedisplay', 'coursedisplay'); $mform->addHelpButton('coursedisplay', 'coursedisplay');
$mform->setDefault('coursedisplay', COURSE_DISPLAY_SINGLEPAGE); $mform->setDefault('coursedisplay', $courseconfig->coursedisplay);


for ($i = 0; $i <= $courseconfig->maxsections; $i++) { for ($i = 0; $i <= $courseconfig->maxsections; $i++) {
$sectionmenu[$i] = "$i"; $sectionmenu[$i] = "$i";
Expand Down

0 comments on commit 79e250d

Please sign in to comment.