MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled

This commit is contained in:
Marina Glancy
2012-11-10 15:34:29 +08:00
parent 8ccaa296fa
commit 3776335ce2
14 changed files with 432 additions and 13 deletions
+3 -2
View File
@@ -15,9 +15,10 @@ if ($hassiteconfig
/// NOTE: these settings must be applied after all other settings because they depend on them
///main course settings
$temp = new admin_settingpage('coursesettings', new lang_string('coursesettings'));
$courseformats = get_plugin_list('format');
require_once($CFG->dirroot.'/course/lib.php');
$courseformats = get_sorted_course_formats(true);
$formcourseformats = array();
foreach ($courseformats as $courseformat => $courseformatdir) {
foreach ($courseformats as $courseformat) {
$formcourseformats[$courseformat] = new lang_string('pluginname', "format_$courseformat");
}
$temp->add(new admin_setting_configselect('moodlecourse/format', new lang_string('format'), new lang_string('coursehelpformat'), 'weeks',$formcourseformats));