mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-52332-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
8ffdb1309c
2 changed files with 5 additions and 4 deletions
|
@ -489,10 +489,9 @@ if ($hassiteconfig) {
|
|||
// Add Calendar type settings.
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
|
||||
foreach (core_component::get_plugin_list_with_file('calendartype', 'settings.php') as $plugin => $settingspath) {
|
||||
$settings = new admin_settingpage('calendartype_' . $plugin . '_settings', new lang_string('pluginname', 'calendartype_' . $plugin), 'moodle/site:config');
|
||||
include($settingspath);
|
||||
$ADMIN->add('calendartype', $settings);
|
||||
foreach (core_plugin_manager::instance()->get_plugins_of_type('calendartype') as $plugin) {
|
||||
/** @var \core\plugininfo\calendartype $plugin */
|
||||
$plugin->load_settings($ADMIN, 'calendartype', $hassiteconfig);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
namespace core\plugininfo;
|
||||
|
||||
use part_of_admin_tree, admin_settingpage;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue