MDL-34866 - Make "course display" default a site configurable option
This commit is contained in:
@@ -47,6 +47,11 @@ if ($hassiteconfig
|
||||
$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');
|
||||
|
||||
@@ -124,7 +124,7 @@ class course_edit_form extends moodleform {
|
||||
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";
|
||||
|
||||
Reference in New Issue
Block a user