mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-29029 add new "Admin tool" plugin type
This commit is contained in:
parent
9cfaebbd0e
commit
11b24ce7b2
@ -474,6 +474,13 @@ foreach (get_plugin_list('report') as $plugin => $plugindir) {
|
||||
$ADMIN->add('reports', new admin_externalpage('report'.$plugin, $reportname, $www_path, 'moodle/site:viewreports'));
|
||||
}
|
||||
|
||||
// Now add various admin tools
|
||||
foreach (get_plugin_list('tool') as $plugin => $plugindir) {
|
||||
$settings_path = "$plugindir/settings.php";
|
||||
if (file_exists($settings_path)) {
|
||||
include($settings_path);
|
||||
}
|
||||
}
|
||||
|
||||
/// Add all local plugins - must be always last!
|
||||
if ($hassiteconfig) {
|
||||
|
@ -98,6 +98,8 @@ $string['type_repository'] = 'Repository';
|
||||
$string['type_repository_plural'] = 'Repositories';
|
||||
$string['type_theme'] = 'Theme';
|
||||
$string['type_theme_plural'] = 'Themes';
|
||||
$string['type_tool'] = 'Admin tool';
|
||||
$string['type_tool_plural'] = 'Admin tools';
|
||||
$string['type_webservice'] = 'Webservice protocol';
|
||||
$string['type_webservice_plural'] = 'Webservice protocols';
|
||||
$string['uninstall'] = 'Uninstall';
|
||||
|
@ -7294,7 +7294,9 @@ function get_plugin_types($fullpaths=true) {
|
||||
'qbehaviour' => 'question/behaviour',
|
||||
'qformat' => 'question/format',
|
||||
'plagiarism' => 'plagiarism',
|
||||
'theme' => 'theme'); // this is a bit hacky, themes may be in $CFG->themedir too
|
||||
'tool' => $CFG->admin.'/tool',
|
||||
'theme' => 'theme', // this is a bit hacky, themes may be in $CFG->themedir too
|
||||
);
|
||||
|
||||
$mods = get_plugin_list('mod');
|
||||
foreach ($mods as $mod => $moddir) {
|
||||
|
@ -366,6 +366,9 @@ class plugin_manager {
|
||||
'standardold'
|
||||
),
|
||||
|
||||
'tool' => array(
|
||||
),
|
||||
|
||||
'webservice' => array(
|
||||
'amf', 'rest', 'soap', 'xmlrpc'
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user