moodle/admin/settings/language.php
Jordi Pujol Ahulló 9c4510a358 MDL-70230 admin: add setting sched. task status
When defining settings that are used by scheduled tasks,
it is also useful, or even needed, to know the status
of that scheduled task to have the whole big picture of
that part of the system.

Based on the admin_setting_description, this new setting
reports its name, its status, a link to the configuration.

When adding a new setting of this type, the user can add
an extra description field to complete the whole meaning.
2021-06-04 08:12:16 +02:00

25 lines
1.9 KiB
PHP

<?php
// This file defines settingpages and externalpages under the "appearance" category
use core_admin\local\settings\setting_scheduled_task_status;
if ($hassiteconfig) {
// "languageandlocation" settingpage
$temp = new admin_settingpage('langsettings', new lang_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configcheckbox('autolang', new lang_string('autolang', 'admin'), new lang_string('configautolang', 'admin'), 1));
$temp->add(new admin_setting_configselect('lang', new lang_string('lang', 'admin'), new lang_string('configlang', 'admin'), current_language(), get_string_manager()->get_list_of_translations())); // $CFG->lang might be set in installer already, default en is in setup.php
$temp->add(new admin_setting_configcheckbox('autolangusercreation', new lang_string('autolangusercreation', 'admin'),
new lang_string('configautolangusercreation', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('langmenu', new lang_string('langmenu', 'admin'), new lang_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_langlist());
$temp->add(new admin_setting_configcheckbox('langcache', new lang_string('langcache', 'admin'), new lang_string('langcache_desc', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('langstringcache', new lang_string('langstringcache', 'admin'), new lang_string('configlangstringcache', 'admin'), 1));
$temp->add(new admin_setting_configtext('locale', new lang_string('localetext', 'admin'), new lang_string('configlocale', 'admin'), '', PARAM_FILE));
$temp->add(new admin_setting_configselect('latinexcelexport', new lang_string('latinexcelexport', 'admin'), new lang_string('configlatinexcelexport', 'admin'), '0', array('0'=>'Unicode','1'=>'Latin')));
$temp->add(new setting_scheduled_task_status('langimporttaskstatus', '\tool_langimport\task\update_langpacks_task'));
$ADMIN->add('language', $temp);
} // end of speedup