Skip to content

Commit

Permalink
MDL-24329 reverting previous patch, it should be imo better to not sh…
Browse files Browse the repository at this point in the history
…ould discouraged legacycoursefiles option when it is disabled site-wide
  • Loading branch information
skodak committed Sep 22, 2010
1 parent 14f001a commit 532a91d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions admin/settings/courses.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
$temp->add(new admin_setting_configselect('moodlecourse/maxbytes', get_string('maximumupload'), get_string('coursehelpmaximumupload'), key($choices), $choices));


$choices = array('0'=>get_string('no'), '2'=>get_string('yes'));
$temp->add(new admin_setting_configselect('moodlecourse/legacyfiles', get_string('courselegacyfiles'), get_string('courselegacyfiles_help'), key($choices), $choices));
if (!empty($CFG->legacyfilesinnewcourses)) {
$choices = array('0'=>get_string('no'), '2'=>get_string('yes'));
$temp->add(new admin_setting_configselect('moodlecourse/legacyfiles', get_string('courselegacyfiles'), get_string('courselegacyfiles_help'), key($choices), $choices));
}

$temp->add(new admin_setting_heading('groups', get_string('groups', 'group'), ''));
$choices = array();
Expand Down
4 changes: 4 additions & 0 deletions course/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ function definition() {
}
$mform->addElement('select', 'legacyfiles', get_string('courselegacyfiles'), $choices);
$mform->addHelpButton('legacyfiles', 'courselegacyfiles');
if (!isset($courseconfig->legacyfiles)) {
// in case this was not initialised properly due to switching of $CFG->legacyfilesinnewcourses
$courseconfig->legacyfiles = 0;
}
$mform->setDefault('legacyfiles', $courseconfig->legacyfiles);
}

Expand Down

0 comments on commit 532a91d

Please sign in to comment.