Skip to content

Commit

Permalink
MDL-23308 added a feature to allow legacy course files in new courses…
Browse files Browse the repository at this point in the history
… too
  • Loading branch information
skodak committed Sep 3, 2010
1 parent 4534768 commit deb7372
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions admin/settings/development.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0));
$temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', get_string('enablegroupmembersonly', 'admin'), get_string('configenablegroupmembersonly', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('legacyfilesinnewcourses', get_string('legacyfilesinnewcourses', 'admin'), get_string('legacyfilesinnewcourses_help', 'admin'), 0));

$ADMIN->add('experimental', $temp);

Expand Down
9 changes: 7 additions & 2 deletions course/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,13 @@ function definition() {
$mform->addHelpButton('maxbytes', 'maximumupload');
$mform->setDefault('maxbytes', $courseconfig->maxbytes);

if (!empty($course->legacyfiles)) {
$choices = array('1'=>get_string('no'), '2'=>get_string('yes'));
if (!empty($course->legacyfiles) or !empty($CFG->legacyfilesinnewcourses)) {
if (empty($course->legacyfiles)) {
//0 or missing means no legacy files ever used in this course - new course or nobody turned on legacy files yet
$choices = array('0'=>get_string('no'), '2'=>get_string('yes'));
} else {
$choices = array('1'=>get_string('no'), '2'=>get_string('yes'));
}
$mform->addElement('select', 'legacyfiles', get_string('courselegacyfiles'), $choices);
$mform->addHelpButton('legacyfiles', 'courselegacyfiles');
}
Expand Down
2 changes: 2 additions & 0 deletions lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,8 @@
$string['latexpreamble'] = 'LaTeX preamble';
$string['latexsettings'] = 'LaTeX renderer Settings';
$string['latinexcelexport'] = 'Excel encoding';
$string['legacyfilesinnewcourses'] = 'Legacy course files in new courses';
$string['legacyfilesinnewcourses_help'] = 'By default legacy course files areas are available only in upgraded courses. Please note some features like single activity backup/restore are not compatible with this settings.';
$string['licensesettings'] = 'License settings';
$string['loading'] = 'Loading';
$string['localetext'] = 'Sitewide locale';
Expand Down

0 comments on commit deb7372

Please sign in to comment.