| Línea 22... |
Línea 22... |
| 22 |
* @package core
|
22 |
* @package core
|
| 23 |
* @copyright 2007 Petr Skoda {@link http://skodak.org}
|
23 |
* @copyright 2007 Petr Skoda {@link http://skodak.org}
|
| 24 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
24 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
| 25 |
*/
|
25 |
*/
|
| Línea -... |
Línea 26... |
| - |
|
26 |
|
| - |
|
27 |
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
|
| - |
|
28 |
$ADMIN->add('modules', new admin_category('formatsettings', new lang_string('courseformats')));
|
| - |
|
29 |
$ADMIN->add('modules', new admin_category('customfieldsettings', new lang_string('customfields', 'core_customfield')));
|
| - |
|
30 |
$ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
|
| - |
|
31 |
$ADMIN->add('modules', new admin_category('authsettings', new lang_string('authentication', 'admin')));
|
| - |
|
32 |
$ADMIN->add('modules', new admin_category('enrolments', new lang_string('enrolments', 'enrol')));
|
| - |
|
33 |
$ADMIN->add('modules', new admin_category('editorsettings', new lang_string('editors', 'editor')));
|
| - |
|
34 |
$ADMIN->add('modules', new admin_category('antivirussettings', new lang_string('antiviruses', 'antivirus')));
|
| - |
|
35 |
$ADMIN->add('modules', new admin_category('mlbackendsettings', new lang_string('mlbackendsettings', 'admin')));
|
| - |
|
36 |
$ADMIN->add('modules', new admin_category('filtersettings', new lang_string('managefilters')));
|
| - |
|
37 |
$ADMIN->add('modules', new admin_category('mediaplayers', new lang_string('type_media_plural', 'plugin')));
|
| - |
|
38 |
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
|
| - |
|
39 |
$ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
|
| - |
|
40 |
$ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
|
| - |
|
41 |
$ADMIN->add('modules', new admin_category('portfoliosettings', new lang_string('portfolios', 'portfolio'),
|
| - |
|
42 |
empty($CFG->enableportfolios)));
|
| - |
|
43 |
$ADMIN->add('modules', new admin_category('repositorysettings', new lang_string('repositories', 'repository')));
|
| - |
|
44 |
$ADMIN->add('modules', new admin_category('qbanksettings', new lang_string('type_qbank_plural', 'plugin')));
|
| - |
|
45 |
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
|
| - |
|
46 |
$ADMIN->add('modules', new admin_category('qtypesettings', new lang_string('questiontypes', 'admin')));
|
| - |
|
47 |
$ADMIN->add('modules', new admin_category('plagiarism', new lang_string('plagiarism', 'plagiarism')));
|
| - |
|
48 |
$ADMIN->add('modules', new admin_category('coursereports', new lang_string('coursereports')));
|
| - |
|
49 |
$ADMIN->add('modules', new admin_category('reportplugins', new lang_string('reports')));
|
| - |
|
50 |
$ADMIN->add('modules', new admin_category('searchplugins', new lang_string('search', 'admin')));
|
| - |
|
51 |
$ADMIN->add('modules', new admin_category('tools', new lang_string('tools', 'admin')));
|
| - |
|
52 |
$ADMIN->add('modules', new admin_category('cache', new lang_string('caching', 'cache')));
|
| - |
|
53 |
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
|
| - |
|
54 |
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
|
| - |
|
55 |
$ADMIN->add('modules', new admin_category('communicationsettings', new lang_string('communication', 'core_communication')));
|
| - |
|
56 |
$ADMIN->add('modules', new admin_category('sms', new lang_string('sms', 'core_sms')));
|
| - |
|
57 |
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
|
| - |
|
58 |
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));
|
| - |
|
59 |
|
| 26 |
|
60 |
|
| 27 |
if ($hassiteconfig) {
|
61 |
if ($hassiteconfig) {
|
| 28 |
/* @var admin_root $ADMIN */
|
62 |
/* @var admin_root $ADMIN */
|
| Línea 29... |
Línea 63... |
| 29 |
$ADMIN->locate('modules')->set_sorting(true);
|
63 |
$ADMIN->locate('modules')->set_sorting(true);
|
| Línea 30... |
Línea 64... |
| 30 |
|
64 |
|
| 31 |
$ADMIN->add('modules', new admin_page_pluginsoverview());
|
- |
|
| Línea 32... |
Línea 65... |
| 32 |
|
65 |
$ADMIN->add('modules', new admin_page_pluginsoverview());
|
| Línea 33... |
Línea 66... |
| 33 |
// activity modules
|
66 |
|
| 34 |
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
|
67 |
// activity modules
|
| Línea 46... |
Línea 79... |
| 46 |
/** @var \core\plugininfo\mod $plugin */
|
79 |
/** @var \core\plugininfo\mod $plugin */
|
| 47 |
$plugin->load_settings($ADMIN, 'modsettings', $hassiteconfig);
|
80 |
$plugin->load_settings($ADMIN, 'modsettings', $hassiteconfig);
|
| 48 |
}
|
81 |
}
|
| Línea 49... |
Línea 82... |
| 49 |
|
82 |
|
| 50 |
// course formats
|
- |
|
| 51 |
$ADMIN->add('modules', new admin_category('formatsettings', new lang_string('courseformats')));
|
83 |
// course formats
|
| 52 |
$temp = new admin_settingpage('manageformats', new lang_string('manageformats', 'core_admin'));
|
84 |
$temp = new admin_settingpage('manageformats', new lang_string('manageformats', 'core_admin'));
|
| 53 |
$temp->add(new admin_setting_manageformats());
|
85 |
$temp->add(new admin_setting_manageformats());
|
| 54 |
$ADMIN->add('formatsettings', $temp);
|
86 |
$ADMIN->add('formatsettings', $temp);
|
| 55 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('format');
|
87 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('format');
|
| Línea 58... |
Línea 90... |
| 58 |
/** @var \core\plugininfo\format $plugin */
|
90 |
/** @var \core\plugininfo\format $plugin */
|
| 59 |
$plugin->load_settings($ADMIN, 'formatsettings', $hassiteconfig);
|
91 |
$plugin->load_settings($ADMIN, 'formatsettings', $hassiteconfig);
|
| 60 |
}
|
92 |
}
|
| Línea 61... |
Línea 93... |
| 61 |
|
93 |
|
| 62 |
// Custom fields.
|
- |
|
| 63 |
$ADMIN->add('modules', new admin_category('customfieldsettings', new lang_string('customfields', 'core_customfield')));
|
94 |
// Custom fields.
|
| 64 |
$temp = new admin_settingpage('managecustomfields', new lang_string('managecustomfields', 'core_admin'));
|
95 |
$temp = new admin_settingpage('managecustomfields', new lang_string('managecustomfields', 'core_admin'));
|
| 65 |
$temp->add(new admin_setting_managecustomfields());
|
96 |
$temp->add(new admin_setting_managecustomfields());
|
| 66 |
$ADMIN->add('customfieldsettings', $temp);
|
97 |
$ADMIN->add('customfieldsettings', $temp);
|
| 67 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('customfield');
|
98 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('customfield');
|
| Línea 70... |
Línea 101... |
| 70 |
/** @var \core\plugininfo\customfield $plugin */
|
101 |
/** @var \core\plugininfo\customfield $plugin */
|
| 71 |
$plugin->load_settings($ADMIN, 'customfieldsettings', $hassiteconfig);
|
102 |
$plugin->load_settings($ADMIN, 'customfieldsettings', $hassiteconfig);
|
| 72 |
}
|
103 |
}
|
| Línea 73... |
Línea 104... |
| 73 |
|
104 |
|
| 74 |
// blocks
|
- |
|
| 75 |
$ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
|
105 |
// blocks
|
| 76 |
$ADMIN->add('blocksettings', new admin_page_manageblocks());
|
106 |
$ADMIN->add('blocksettings', new admin_page_manageblocks());
|
| 77 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('block');
|
107 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('block');
|
| 78 |
core_collator::asort_objects_by_property($plugins, 'displayname');
|
108 |
core_collator::asort_objects_by_property($plugins, 'displayname');
|
| 79 |
foreach ($plugins as $plugin) {
|
109 |
foreach ($plugins as $plugin) {
|
| 80 |
/** @var \core\plugininfo\block $plugin */
|
110 |
/** @var \core\plugininfo\block $plugin */
|
| 81 |
$plugin->load_settings($ADMIN, 'blocksettings', $hassiteconfig);
|
111 |
$plugin->load_settings($ADMIN, 'blocksettings', $hassiteconfig);
|
| Línea 82... |
Línea 112... |
| 82 |
}
|
112 |
}
|
| 83 |
|
- |
|
| 84 |
// authentication plugins
|
- |
|
| 85 |
$ADMIN->add('modules', new admin_category('authsettings', new lang_string('authentication', 'admin')));
|
113 |
|
| 86 |
|
114 |
// authentication plugins
|
| 87 |
$temp = new admin_settingpage('manageauths', new lang_string('authsettings', 'admin'));
|
115 |
$temp = new admin_settingpage('manageauths', new lang_string('authsettings', 'admin'));
|
| 88 |
$temp->add(new admin_setting_manageauths());
|
116 |
$temp->add(new admin_setting_manageauths());
|
| 89 |
$temp->add(new admin_setting_heading('manageauthscommonheading', new lang_string('commonsettings', 'admin'), ''));
|
117 |
$temp->add(new admin_setting_heading('manageauthscommonheading', new lang_string('commonsettings', 'admin'), ''));
|
| Línea 100... |
Línea 128... |
| 100 |
$temp->add(new admin_setting_configselect('limitconcurrentlogins',
|
128 |
$temp->add(new admin_setting_configselect('limitconcurrentlogins',
|
| 101 |
new lang_string('limitconcurrentlogins', 'core_auth'),
|
129 |
new lang_string('limitconcurrentlogins', 'core_auth'),
|
| 102 |
new lang_string('limitconcurrentlogins_desc', 'core_auth'), 0, $options));
|
130 |
new lang_string('limitconcurrentlogins_desc', 'core_auth'), 0, $options));
|
| 103 |
$temp->add(new admin_setting_configtext('alternateloginurl', new lang_string('alternateloginurl', 'auth'),
|
131 |
$temp->add(new admin_setting_configtext('alternateloginurl', new lang_string('alternateloginurl', 'auth'),
|
| 104 |
new lang_string('alternatelogin', 'auth', htmlspecialchars(get_login_url(), ENT_COMPAT)), ''));
|
132 |
new lang_string('alternatelogin', 'auth', htmlspecialchars(get_login_url(), ENT_COMPAT)), ''));
|
| - |
|
133 |
$temp->add(new admin_setting_configcheckbox('showloginform', new lang_string('showloginform', 'core_auth'),
|
| - |
|
134 |
new lang_string('showloginform_desc', 'core_auth'), 1));
|
| 105 |
$temp->add(new admin_setting_configtext('forgottenpasswordurl', new lang_string('forgottenpasswordurl', 'auth'),
|
135 |
$temp->add(new admin_setting_configtext('forgottenpasswordurl', new lang_string('forgottenpasswordurl', 'auth'),
|
| 106 |
new lang_string('forgottenpassword', 'auth'), '', PARAM_URL));
|
136 |
new lang_string('forgottenpassword', 'auth'), '', PARAM_URL));
|
| 107 |
$temp->add(new admin_setting_confightmleditor('auth_instructions', new lang_string('instructions', 'auth'),
|
137 |
$temp->add(new admin_setting_confightmleditor('auth_instructions', new lang_string('instructions', 'auth'),
|
| 108 |
new lang_string('authinstructions', 'auth'), ''));
|
138 |
new lang_string('authinstructions', 'auth'), ''));
|
| 109 |
$setting = new admin_setting_configtext('allowemailaddresses', new lang_string('allowemailaddresses', 'admin'),
|
139 |
$setting = new admin_setting_configtext('allowemailaddresses', new lang_string('allowemailaddresses', 'admin'),
|
| Línea 156... |
Línea 186... |
| 156 |
/** @var \core\plugininfo\auth $plugin */
|
186 |
/** @var \core\plugininfo\auth $plugin */
|
| 157 |
$plugin->load_settings($ADMIN, 'authsettings', $hassiteconfig);
|
187 |
$plugin->load_settings($ADMIN, 'authsettings', $hassiteconfig);
|
| 158 |
}
|
188 |
}
|
| Línea 159... |
Línea 189... |
| 159 |
|
189 |
|
| 160 |
// Enrolment plugins
|
- |
|
| 161 |
$ADMIN->add('modules', new admin_category('enrolments', new lang_string('enrolments', 'enrol')));
|
190 |
// Enrolment plugins
|
| 162 |
$temp = new admin_settingpage('manageenrols', new lang_string('manageenrols', 'enrol'));
|
191 |
$temp = new admin_settingpage('manageenrols', new lang_string('manageenrols', 'enrol'));
|
| 163 |
$temp->add(new admin_setting_manageenrols());
|
192 |
$temp->add(new admin_setting_manageenrols());
|
| Línea 164... |
Línea 193... |
| 164 |
$ADMIN->add('enrolments', $temp);
|
193 |
$ADMIN->add('enrolments', $temp);
|
| Línea 173... |
Línea 202... |
| 173 |
$plugin->load_settings($ADMIN, 'enrolments', $hassiteconfig);
|
202 |
$plugin->load_settings($ADMIN, 'enrolments', $hassiteconfig);
|
| 174 |
}
|
203 |
}
|
| Línea 175... |
Línea 204... |
| 175 |
|
204 |
|
| 176 |
|
- |
|
| 177 |
/// Editor plugins
|
205 |
|
| 178 |
$ADMIN->add('modules', new admin_category('editorsettings', new lang_string('editors', 'editor')));
|
206 |
/// Editor plugins
|
| 179 |
$temp = new admin_settingpage('manageeditors', new lang_string('editorsettings', 'editor'));
|
207 |
$temp = new admin_settingpage('manageeditors', new lang_string('editorsettings', 'editor'));
|
| 180 |
$temp->add(new \core_admin\admin\admin_setting_plugin_manager(
|
208 |
$temp->add(new \core_admin\admin\admin_setting_plugin_manager(
|
| 181 |
'editor',
|
209 |
'editor',
|
| Línea 190... |
Línea 218... |
| 190 |
/** @var \core\plugininfo\editor $plugin */
|
218 |
/** @var \core\plugininfo\editor $plugin */
|
| 191 |
$plugin->load_settings($ADMIN, 'editorsettings', $hassiteconfig);
|
219 |
$plugin->load_settings($ADMIN, 'editorsettings', $hassiteconfig);
|
| 192 |
}
|
220 |
}
|
| Línea 193... |
Línea 221... |
| 193 |
|
221 |
|
| 194 |
// Antivirus plugins.
|
- |
|
| 195 |
$ADMIN->add('modules', new admin_category('antivirussettings', new lang_string('antiviruses', 'antivirus')));
|
222 |
// Antivirus plugins.
|
| 196 |
$temp = new admin_settingpage('manageantiviruses', new lang_string('antivirussettings', 'antivirus'));
|
223 |
$temp = new admin_settingpage('manageantiviruses', new lang_string('antivirussettings', 'antivirus'));
|
| Línea 197... |
Línea 224... |
| 197 |
$temp->add(new admin_setting_manageantiviruses());
|
224 |
$temp->add(new admin_setting_manageantiviruses());
|
| 198 |
|
225 |
|
| Línea 262... |
Línea 289... |
| 262 |
/* @var \core\plugininfo\antivirus $plugin */
|
289 |
/* @var \core\plugininfo\antivirus $plugin */
|
| 263 |
$plugin->load_settings($ADMIN, 'antivirussettings', $hassiteconfig);
|
290 |
$plugin->load_settings($ADMIN, 'antivirussettings', $hassiteconfig);
|
| 264 |
}
|
291 |
}
|
| Línea 265... |
Línea 292... |
| 265 |
|
292 |
|
| 266 |
// Machine learning backend plugins.
|
- |
|
| 267 |
$ADMIN->add('modules', new admin_category('mlbackendsettings', new lang_string('mlbackendsettings', 'admin')));
|
293 |
// Machine learning backend plugins.
|
| 268 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('mlbackend');
|
294 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('mlbackend');
|
| 269 |
foreach ($plugins as $plugin) {
|
295 |
foreach ($plugins as $plugin) {
|
| 270 |
$plugin->load_settings($ADMIN, 'mlbackendsettings', $hassiteconfig);
|
296 |
$plugin->load_settings($ADMIN, 'mlbackendsettings', $hassiteconfig);
|
| Línea 271... |
Línea 297... |
| 271 |
}
|
297 |
}
|
| 272 |
|
- |
|
| Línea 273... |
Línea 298... |
| 273 |
/// Filter plugins
|
298 |
|
| Línea 274... |
Línea 299... |
| 274 |
$ADMIN->add('modules', new admin_category('filtersettings', new lang_string('managefilters')));
|
299 |
/// Filter plugins
|
| 275 |
|
300 |
|
| Línea 283... |
Línea 308... |
| 283 |
array('0' => new lang_string('none'), '1' => new lang_string('allfiles'), '2' => new lang_string('htmlfilesonly')));
|
308 |
array('0' => new lang_string('none'), '1' => new lang_string('allfiles'), '2' => new lang_string('htmlfilesonly')));
|
| 284 |
$items[] = new admin_setting_configcheckbox('filtermatchoneperpage', new lang_string('filtermatchoneperpage', 'admin'), new lang_string('configfiltermatchoneperpage', 'admin'), 0);
|
309 |
$items[] = new admin_setting_configcheckbox('filtermatchoneperpage', new lang_string('filtermatchoneperpage', 'admin'), new lang_string('configfiltermatchoneperpage', 'admin'), 0);
|
| 285 |
$items[] = new admin_setting_configcheckbox('filtermatchonepertext', new lang_string('filtermatchonepertext', 'admin'), new lang_string('configfiltermatchonepertext', 'admin'), 0);
|
310 |
$items[] = new admin_setting_configcheckbox('filtermatchonepertext', new lang_string('filtermatchonepertext', 'admin'), new lang_string('configfiltermatchonepertext', 'admin'), 0);
|
| 286 |
$items[] = new admin_setting_configcheckbox('filternavigationwithsystemcontext',
|
311 |
$items[] = new admin_setting_configcheckbox('filternavigationwithsystemcontext',
|
| 287 |
new lang_string('filternavigationwithsystemcontext', 'admin'),
|
312 |
new lang_string('filternavigationwithsystemcontext', 'admin'),
|
| 288 |
new lang_string('configfilternavigationwithsystemcontext', 'admin'), 0);
|
313 |
new lang_string('configfilternavigationwithsystemcontext', 'admin'), 1);
|
| 289 |
foreach ($items as $item) {
|
314 |
foreach ($items as $item) {
|
| 290 |
$item->set_updatedcallback('reset_text_filters_cache');
|
315 |
$item->set_updatedcallback('reset_text_filters_cache');
|
| 291 |
$temp->add($item);
|
316 |
$temp->add($item);
|
| 292 |
}
|
317 |
}
|
| 293 |
}
|
318 |
}
|
| Línea 299... |
Línea 324... |
| 299 |
/** @var \core\plugininfo\filter $plugin */
|
324 |
/** @var \core\plugininfo\filter $plugin */
|
| 300 |
$plugin->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
|
325 |
$plugin->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
|
| 301 |
}
|
326 |
}
|
| Línea 302... |
Línea 327... |
| 302 |
|
327 |
|
| 303 |
// Media players.
|
- |
|
| 304 |
$ADMIN->add('modules', new admin_category('mediaplayers', new lang_string('type_media_plural', 'plugin')));
|
328 |
// Media players.
|
| 305 |
$temp = new admin_settingpage('managemediaplayers', new lang_string('managemediaplayers', 'media'));
|
329 |
$temp = new admin_settingpage('managemediaplayers', new lang_string('managemediaplayers', 'media'));
|
| 306 |
$temp->add(new admin_setting_heading('mediaformats', get_string('mediaformats', 'core_media'),
|
330 |
$temp->add(new admin_setting_heading('mediaformats', get_string('mediaformats', 'core_media'),
|
| 307 |
format_text(get_string('mediaformats_desc', 'core_media'), FORMAT_MARKDOWN)));
|
331 |
format_text(get_string('mediaformats_desc', 'core_media'), FORMAT_MARKDOWN)));
|
| 308 |
$temp->add(new \core_admin\admin\admin_setting_plugin_manager(
|
332 |
$temp->add(new \core_admin\admin\admin_setting_plugin_manager(
|
| Línea 319... |
Línea 343... |
| 319 |
new lang_string('defaultheight', 'core_media'), new lang_string('defaultheightdesc', 'core_media'),
|
343 |
new lang_string('defaultheight', 'core_media'), new lang_string('defaultheightdesc', 'core_media'),
|
| 320 |
360, PARAM_INT, 10));
|
344 |
360, PARAM_INT, 10));
|
| 321 |
$ADMIN->add('mediaplayers', $temp);
|
345 |
$ADMIN->add('mediaplayers', $temp);
|
| Línea 322... |
Línea 346... |
| 322 |
|
346 |
|
| 323 |
// Convert plugins.
|
- |
|
| 324 |
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
|
347 |
// Convert plugins.
|
| 325 |
$temp = new admin_settingpage('managefileconverterplugins', new lang_string('type_fileconvertermanage', 'plugin'));
|
348 |
$temp = new admin_settingpage('managefileconverterplugins', new lang_string('type_fileconvertermanage', 'plugin'));
|
| 326 |
$temp->add(new admin_setting_manage_fileconverter_plugins());
|
349 |
$temp->add(new admin_setting_manage_fileconverter_plugins());
|
| Línea 327... |
Línea 350... |
| 327 |
$ADMIN->add('fileconverterplugins', $temp);
|
350 |
$ADMIN->add('fileconverterplugins', $temp);
|
| Línea 339... |
Línea 362... |
| 339 |
/** @var \core\plugininfo\media $plugin */
|
362 |
/** @var \core\plugininfo\media $plugin */
|
| 340 |
$plugin->load_settings($ADMIN, 'mediaplayers', $hassiteconfig);
|
363 |
$plugin->load_settings($ADMIN, 'mediaplayers', $hassiteconfig);
|
| 341 |
}
|
364 |
}
|
| Línea 342... |
Línea 365... |
| 342 |
|
365 |
|
| 343 |
// Payment gateway plugins.
|
- |
|
| 344 |
$ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
|
366 |
// Payment gateway plugins.
|
| 345 |
$temp = new admin_settingpage('managepaymentgateways', new lang_string('type_paygwmanage', 'plugin'));
|
367 |
$temp = new admin_settingpage('managepaymentgateways', new lang_string('type_paygwmanage', 'plugin'));
|
| 346 |
$temp->add(new \core_admin\local\settings\manage_payment_gateway_plugins());
|
368 |
$temp->add(new \core_admin\local\settings\manage_payment_gateway_plugins());
|
| 347 |
$temp->add(new admin_setting_description(
|
369 |
$temp->add(new admin_setting_description(
|
| 348 |
'managepaymentgatewayspostfix',
|
370 |
'managepaymentgatewayspostfix',
|
| Línea 358... |
Línea 380... |
| 358 |
/** @var \core\plugininfo\paygw $plugin */
|
380 |
/** @var \core\plugininfo\paygw $plugin */
|
| 359 |
$plugin->load_settings($ADMIN, 'paymentgateways', $hassiteconfig);
|
381 |
$plugin->load_settings($ADMIN, 'paymentgateways', $hassiteconfig);
|
| 360 |
}
|
382 |
}
|
| Línea 361... |
Línea 383... |
| 361 |
|
383 |
|
| 362 |
// Data format settings.
|
- |
|
| 363 |
$ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
|
384 |
// Data format settings.
|
| 364 |
$temp = new admin_settingpage('managedataformats', new lang_string('managedataformats'));
|
385 |
$temp = new admin_settingpage('managedataformats', new lang_string('managedataformats'));
|
| 365 |
$temp->add(new admin_setting_managedataformats());
|
386 |
$temp->add(new admin_setting_managedataformats());
|
| Línea 366... |
Línea 387... |
| 366 |
$ADMIN->add('dataformatsettings', $temp);
|
387 |
$ADMIN->add('dataformatsettings', $temp);
|
| Línea 372... |
Línea 393... |
| 372 |
$plugin->load_settings($ADMIN, 'dataformatsettings', $hassiteconfig);
|
393 |
$plugin->load_settings($ADMIN, 'dataformatsettings', $hassiteconfig);
|
| 373 |
}
|
394 |
}
|
| Línea 374... |
Línea 395... |
| 374 |
|
395 |
|
| 375 |
//== Portfolio settings ==
|
396 |
//== Portfolio settings ==
|
| 376 |
require_once($CFG->libdir. '/portfoliolib.php');
|
- |
|
| 377 |
$catname = new lang_string('portfolios', 'portfolio');
|
397 |
require_once($CFG->libdir. '/portfoliolib.php');
|
| 378 |
$manage = new lang_string('manageportfolios', 'portfolio');
|
398 |
$manage = new lang_string('manageportfolios', 'portfolio');
|
| Línea 379... |
Línea -... |
| 379 |
$url = "$CFG->wwwroot/$CFG->admin/portfolio.php";
|
- |
|
| 380 |
|
- |
|
| 381 |
$ADMIN->add('modules', new admin_category('portfoliosettings', $catname, empty($CFG->enableportfolios)));
|
399 |
$url = "$CFG->wwwroot/$CFG->admin/portfolio.php";
|
| 382 |
|
400 |
|
| 383 |
// Add manage page (with table)
|
401 |
// Add manage page (with table)
|
| Línea 384... |
Línea 402... |
| 384 |
$temp = new admin_page_manageportfolios();
|
402 |
$temp = new admin_page_manageportfolios();
|
| Línea 431... |
Línea 449... |
| 431 |
);
|
449 |
);
|
| 432 |
}
|
450 |
}
|
| Línea 433... |
Línea 451... |
| 433 |
|
451 |
|
| 434 |
// repository setting
|
452 |
// repository setting
|
| 435 |
require_once("$CFG->dirroot/repository/lib.php");
|
- |
|
| 436 |
$catname =new lang_string('repositories', 'repository');
|
453 |
require_once("$CFG->dirroot/repository/lib.php");
|
| 437 |
$managerepo = new lang_string('manage', 'repository');
|
454 |
$managerepo = new lang_string('manage', 'repository');
|
| 438 |
$url = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
|
- |
|
| Línea 439... |
Línea 455... |
| 439 |
$ADMIN->add('modules', new admin_category('repositorysettings', $catname));
|
455 |
$url = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
|
| 440 |
|
456 |
|
| 441 |
// Add main page (with table)
|
457 |
// Add main page (with table)
|
| Línea 470... |
Línea 486... |
| 470 |
}
|
486 |
}
|
| 471 |
}
|
487 |
}
|
| Línea 472... |
Línea 488... |
| 472 |
|
488 |
|
| 473 |
// Question bank settings.
|
489 |
// Question bank settings.
|
| 474 |
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
|
- |
|
| 475 |
$ADMIN->add('modules', new admin_category('qbanksettings',
|
- |
|
| 476 |
new lang_string('type_qbank_plural', 'plugin')));
|
490 |
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
|
| 477 |
$temp = new admin_settingpage('manageqbanks', new lang_string('manageqbanks', 'admin'));
|
491 |
$temp = new admin_settingpage('manageqbanks', new lang_string('manageqbanks', 'admin'));
|
| 478 |
$temp->add(new \core_question\admin\manage_qbank_plugins_page());
|
492 |
$temp->add(new \core_question\admin\manage_qbank_plugins_page());
|
| 479 |
$ADMIN->add('qbanksettings', $temp);
|
493 |
$ADMIN->add('qbanksettings', $temp);
|
| Línea 487... |
Línea 501... |
| 487 |
|
501 |
|
| 488 |
// Question type settings
|
502 |
// Question type settings
|
| Línea 489... |
Línea 503... |
| 489 |
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
|
503 |
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
|
| 490 |
|
- |
|
| 491 |
// Question behaviour settings.
|
504 |
|
| Línea 492... |
Línea 505... |
| 492 |
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
|
505 |
// Question behaviour settings.
|
| 493 |
$ADMIN->add('qbehavioursettings', new admin_page_manageqbehaviours());
|
- |
|
| 494 |
|
506 |
$ADMIN->add('qbehavioursettings', new admin_page_manageqbehaviours());
|
| Línea 495... |
Línea 507... |
| 495 |
// Question type settings.
|
507 |
|
| 496 |
$ADMIN->add('modules', new admin_category('qtypesettings', new lang_string('questiontypes', 'admin')));
|
508 |
// Question type settings.
|
| 497 |
$ADMIN->add('qtypesettings', new admin_page_manageqtypes());
|
509 |
$ADMIN->add('qtypesettings', new admin_page_manageqtypes());
|
| Línea 540... |
Línea 552... |
| 540 |
get_string('rightanswer', 'question'), '', 1, $hiddenofvisible));
|
552 |
get_string('rightanswer', 'question'), '', 1, $hiddenofvisible));
|
| Línea 541... |
Línea 553... |
| 541 |
|
553 |
|
| 542 |
$settings->add(new admin_setting_configselect('question_preview/history',
|
554 |
$settings->add(new admin_setting_configselect('question_preview/history',
|
| Línea -... |
Línea 555... |
| - |
|
555 |
get_string('responsehistory', 'question'), '', 0, $hiddenofvisible));
|
| - |
|
556 |
|
| - |
|
557 |
// Question editing settings.
|
| - |
|
558 |
$settings = new admin_settingpage('qediting',
|
| - |
|
559 |
get_string('questionediting', 'question'),
|
| - |
|
560 |
'moodle/question:config');
|
| - |
|
561 |
$ADMIN->add('qtypesettings', $settings);
|
| - |
|
562 |
|
| - |
|
563 |
$settings->add(new admin_setting_heading('qediting_options',
|
| - |
|
564 |
'', get_string('questionediting_desc', 'question')));
|
| - |
|
565 |
|
| - |
|
566 |
$settings->add(new admin_setting_configcheckbox('questiondefaultssave',
|
| 543 |
get_string('responsehistory', 'question'), '', 0, $hiddenofvisible));
|
567 |
get_string('questiondefaultssave', 'question'), get_string('questiondefaultssave_desc', 'question'), 1));
|
| 544 |
|
568 |
|
| 545 |
// Settings for particular question types.
|
569 |
// Settings for particular question types.
|
| 546 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('qtype');
|
570 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('qtype');
|
| 547 |
core_collator::asort_objects_by_property($plugins, 'displayname');
|
571 |
core_collator::asort_objects_by_property($plugins, 'displayname');
|
| Línea 551... |
Línea 575... |
| 551 |
}
|
575 |
}
|
| 552 |
}
|
576 |
}
|
| Línea 553... |
Línea 577... |
| 553 |
|
577 |
|
| 554 |
// Plagiarism plugin settings
|
578 |
// Plagiarism plugin settings
|
| 555 |
if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
|
- |
|
| 556 |
$ADMIN->add('modules', new admin_category('plagiarism', new lang_string('plagiarism', 'plagiarism')));
|
579 |
if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
|
| 557 |
$ADMIN->add('plagiarism', new admin_externalpage('manageplagiarismplugins', new lang_string('manageplagiarism', 'plagiarism'),
|
580 |
$ADMIN->add('plagiarism', new admin_externalpage('manageplagiarismplugins', new lang_string('manageplagiarism', 'plagiarism'),
|
| Línea 558... |
Línea 581... |
| 558 |
$CFG->wwwroot . '/' . $CFG->admin . '/plagiarism.php'));
|
581 |
$CFG->wwwroot . '/' . $CFG->admin . '/plagiarism.php'));
|
| 559 |
|
582 |
|
| Línea 583... |
Línea 606... |
| 583 |
$pages[] = $settings;
|
606 |
$pages[] = $settings;
|
| 584 |
}
|
607 |
}
|
| 585 |
}
|
608 |
}
|
| 586 |
}
|
609 |
}
|
| 587 |
if (!empty($pages)) {
|
610 |
if (!empty($pages)) {
|
| 588 |
$ADMIN->add('modules', new admin_category('coursereports', new lang_string('coursereports')));
|
- |
|
| 589 |
core_collator::asort_objects_by_property($pages, 'visiblename');
|
611 |
core_collator::asort_objects_by_property($pages, 'visiblename');
|
| 590 |
foreach ($pages as $page) {
|
612 |
foreach ($pages as $page) {
|
| 591 |
$ADMIN->add('coursereports', $page);
|
613 |
$ADMIN->add('coursereports', $page);
|
| 592 |
}
|
614 |
}
|
| 593 |
}
|
615 |
}
|
| Línea 605... |
Línea 627... |
| 605 |
if ($settings) {
|
627 |
if ($settings) {
|
| 606 |
$pages[] = $settings;
|
628 |
$pages[] = $settings;
|
| 607 |
}
|
629 |
}
|
| 608 |
}
|
630 |
}
|
| 609 |
}
|
631 |
}
|
| 610 |
$ADMIN->add('modules', new admin_category('reportplugins', new lang_string('reports')));
|
- |
|
| 611 |
$ADMIN->add('reportplugins', new admin_externalpage('managereports', new lang_string('reportsmanage', 'admin'),
|
632 |
$ADMIN->add('reportplugins', new admin_externalpage('managereports', new lang_string('reportsmanage', 'admin'),
|
| 612 |
$CFG->wwwroot . '/' . $CFG->admin . '/reports.php'));
|
633 |
$CFG->wwwroot . '/' . $CFG->admin . '/reports.php'));
|
| 613 |
core_collator::asort_objects_by_property($pages, 'visiblename');
|
634 |
core_collator::asort_objects_by_property($pages, 'visiblename');
|
| 614 |
foreach ($pages as $page) {
|
635 |
foreach ($pages as $page) {
|
| 615 |
$ADMIN->add('reportplugins', $page);
|
636 |
$ADMIN->add('reportplugins', $page);
|
| 616 |
}
|
637 |
}
|
| Línea 617... |
Línea 638... |
| 617 |
|
638 |
|
| 618 |
if ($hassiteconfig) {
|
639 |
if ($hassiteconfig) {
|
| 619 |
// Global Search engine plugins.
|
- |
|
| 620 |
$ADMIN->add('modules', new admin_category('searchplugins', new lang_string('search', 'admin')));
|
640 |
// Global Search engine plugins.
|
| Línea 621... |
Línea 641... |
| 621 |
$temp = new admin_settingpage('manageglobalsearch', new lang_string('globalsearchmanage', 'admin'));
|
641 |
$temp = new admin_settingpage('manageglobalsearch', new lang_string('globalsearchmanage', 'admin'));
|
| 622 |
|
642 |
|
| 623 |
$pages = array();
|
643 |
$pages = array();
|
| Línea 757... |
Línea 777... |
| 757 |
}
|
777 |
}
|
| 758 |
}
|
778 |
}
|
| Línea 759... |
Línea 779... |
| 759 |
|
779 |
|
| 760 |
/// Add all admin tools
|
780 |
/// Add all admin tools
|
| 761 |
if ($hassiteconfig) {
|
- |
|
| 762 |
$ADMIN->add('modules', new admin_category('tools', new lang_string('tools', 'admin')));
|
781 |
if ($hassiteconfig) {
|
| 763 |
$settingspage = new admin_settingpage('toolsmanagement', new lang_string('toolsmanage', 'admin'));
|
782 |
$settingspage = new admin_settingpage('toolsmanagement', new lang_string('toolsmanage', 'admin'));
|
| 764 |
$ADMIN->add('tools', $settingspage);
|
783 |
$ADMIN->add('tools', $settingspage);
|
| 765 |
$settingspage->add(new \core_admin\admin\admin_setting_plugin_manager(
|
784 |
$settingspage->add(new \core_admin\admin\admin_setting_plugin_manager(
|
| 766 |
'tool',
|
785 |
'tool',
|
| Línea 778... |
Línea 797... |
| 778 |
$plugin->load_settings($ADMIN, null, $hassiteconfig);
|
797 |
$plugin->load_settings($ADMIN, null, $hassiteconfig);
|
| 779 |
}
|
798 |
}
|
| Línea 780... |
Línea 799... |
| 780 |
|
799 |
|
| 781 |
// Now add the Cache plugins
|
800 |
// Now add the Cache plugins
|
| 782 |
if ($hassiteconfig) {
|
- |
|
| 783 |
$ADMIN->add('modules', new admin_category('cache', new lang_string('caching', 'cache')));
|
801 |
if ($hassiteconfig) {
|
| 784 |
$ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php'));
|
802 |
$ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php'));
|
| 785 |
$ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php'));
|
803 |
$ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php'));
|
| 786 |
$ADMIN->add('cache', new admin_externalpage('cacheusage',
|
804 |
$ADMIN->add('cache', new admin_externalpage('cacheusage',
|
| 787 |
new lang_string('cacheusage', 'cache'), $CFG->wwwroot . '/cache/usage.php'));
|
- |
|
| 788 |
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
|
805 |
new lang_string('cacheusage', 'cache'), $CFG->wwwroot . '/cache/usage.php'));
|
| 789 |
$ADMIN->locate('cachestores')->set_sorting(true);
|
806 |
$ADMIN->locate('cachestores')->set_sorting(true);
|
| 790 |
foreach (core_component::get_plugin_list('cachestore') as $plugin => $path) {
|
807 |
foreach (core_component::get_plugin_list('cachestore') as $plugin => $path) {
|
| 791 |
$settingspath = $path.'/settings.php';
|
808 |
$settingspath = $path.'/settings.php';
|
| 792 |
if (file_exists($settingspath)) {
|
809 |
if (file_exists($settingspath)) {
|
| Línea 797... |
Línea 814... |
| 797 |
}
|
814 |
}
|
| 798 |
}
|
815 |
}
|
| Línea 799... |
Línea 816... |
| 799 |
|
816 |
|
| 800 |
// Add Calendar type settings.
|
817 |
// Add Calendar type settings.
|
| 801 |
if ($hassiteconfig) {
|
- |
|
| 802 |
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
|
818 |
if ($hassiteconfig) {
|
| 803 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('calendartype');
|
819 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('calendartype');
|
| 804 |
core_collator::asort_objects_by_property($plugins, 'displayname');
|
820 |
core_collator::asort_objects_by_property($plugins, 'displayname');
|
| 805 |
foreach ($plugins as $plugin) {
|
821 |
foreach ($plugins as $plugin) {
|
| 806 |
/** @var \core\plugininfo\calendartype $plugin */
|
822 |
/** @var \core\plugininfo\calendartype $plugin */
|
| 807 |
$plugin->load_settings($ADMIN, 'calendartype', $hassiteconfig);
|
823 |
$plugin->load_settings($ADMIN, 'calendartype', $hassiteconfig);
|
| 808 |
}
|
824 |
}
|
| Línea 809... |
Línea 825... |
| 809 |
}
|
825 |
}
|
| 810 |
|
826 |
|
| 811 |
// Communication plugins.
|
- |
|
| 812 |
if ($hassiteconfig && core_communication\api::is_available()) {
|
827 |
// Communication plugins.
|
| 813 |
$ADMIN->add('modules', new admin_category('communicationsettings', new lang_string('communication', 'core_communication')));
|
828 |
if ($hassiteconfig && core_communication\api::is_available()) {
|
| 814 |
$temp = new admin_settingpage('managecommunicationproviders',
|
829 |
$temp = new admin_settingpage('managecommunicationproviders',
|
| 815 |
new lang_string('managecommunicationproviders', 'core_communication'));
|
830 |
new lang_string('managecommunicationproviders', 'core_communication'));
|
| 816 |
$temp->add(new \core_communication\admin\manage_communication_providers_page());
|
831 |
$temp->add(new \core_communication\admin\manage_communication_providers_page());
|
| Línea 820... |
Línea 835... |
| 820 |
/** @var \core\plugininfo\communication $plugin */
|
835 |
/** @var \core\plugininfo\communication $plugin */
|
| 821 |
$plugin->load_settings($ADMIN, 'communicationsettings', $hassiteconfig);
|
836 |
$plugin->load_settings($ADMIN, 'communicationsettings', $hassiteconfig);
|
| 822 |
}
|
837 |
}
|
| 823 |
}
|
838 |
}
|
| Línea -... |
Línea 839... |
| - |
|
839 |
|
| - |
|
840 |
// SMS plugins.
|
| - |
|
841 |
if ($hassiteconfig) {
|
| - |
|
842 |
$ADMIN->add(
|
| - |
|
843 |
'sms',
|
| - |
|
844 |
new admin_externalpage(
|
| - |
|
845 |
'smsgateway',
|
| - |
|
846 |
new lang_string('manage_sms_gateways', 'core_sms'),
|
| - |
|
847 |
$CFG->wwwroot . '/sms/sms_gateways.php',
|
| - |
|
848 |
),
|
| - |
|
849 |
);
|
| - |
|
850 |
foreach (core_component::get_plugin_list('smsgateway') as $plugin => $path) {
|
| - |
|
851 |
$settingspath = $path . '/settings.php';
|
| - |
|
852 |
if (file_exists($settingspath)) {
|
| - |
|
853 |
$settings = new admin_settingpage(
|
| - |
|
854 |
'smsgateway_' . $plugin . '_settings',
|
| - |
|
855 |
new lang_string('pluginname', 'smsgateway_' . $plugin),
|
| - |
|
856 |
'moodle/site:config',
|
| - |
|
857 |
);
|
| - |
|
858 |
include($settingspath);
|
| - |
|
859 |
$ADMIN->add('smsgateway', $settings);
|
| - |
|
860 |
}
|
| - |
|
861 |
}
|
| - |
|
862 |
}
|
| 824 |
|
863 |
|
| 825 |
// Content bank content types.
|
864 |
// Content bank content types.
|
| 826 |
if ($hassiteconfig) {
|
- |
|
| 827 |
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
|
865 |
if ($hassiteconfig) {
|
| 828 |
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
|
866 |
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
|
| 829 |
$temp->add(new admin_setting_managecontentbankcontenttypes());
|
867 |
$temp->add(new admin_setting_managecontentbankcontenttypes());
|
| - |
|
868 |
$ADMIN->add('contentbanksettings', $temp);
|
| - |
|
869 |
$ADMIN->add('contentbanksettings',
|
| - |
|
870 |
new admin_externalpage('contentbank', new lang_string('contentbankcustomfields', 'contentbank'),
|
| - |
|
871 |
$CFG->wwwroot . '/contentbank/customfield.php',
|
| - |
|
872 |
'moodle/contentbank:configurecustomfields'
|
| - |
|
873 |
)
|
| 830 |
$ADMIN->add('contentbanksettings', $temp);
|
874 |
);
|
| 831 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
|
875 |
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
|
| 832 |
foreach ($plugins as $plugin) {
|
876 |
foreach ($plugins as $plugin) {
|
| 833 |
/** @var \core\plugininfo\contentbank $plugin */
|
877 |
/** @var \core\plugininfo\contentbank $plugin */
|
| 834 |
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
|
878 |
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
|
| 835 |
}
|
879 |
}
|
| Línea 836... |
Línea 880... |
| 836 |
}
|
880 |
}
|
| 837 |
|
881 |
|
| 838 |
/// Add all local plugins - must be always last!
|
- |
|
| 839 |
if ($hassiteconfig) {
|
882 |
/// Add all local plugins - must be always last!
|
| 840 |
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));
|
883 |
if ($hassiteconfig) {
|
| 841 |
$ADMIN->add('localplugins', new admin_externalpage('managelocalplugins', new lang_string('localpluginsmanage'),
|
884 |
$ADMIN->add('localplugins', new admin_externalpage('managelocalplugins', new lang_string('localpluginsmanage'),
|
| Línea 842... |
Línea 885... |
| 842 |
$CFG->wwwroot . '/' . $CFG->admin . '/localplugins.php'));
|
885 |
$CFG->wwwroot . '/' . $CFG->admin . '/localplugins.php'));
|