MDL-35661 Loading of plugin settings for modules (plugininfo_mod)

This commit is contained in:
Marina Glancy
2012-10-09 09:56:42 +08:00
parent 5cdb1893a9
commit fde6f79fae
5 changed files with 46 additions and 28 deletions
+3 -3
View File
@@ -447,10 +447,10 @@ class assign_plugin_manager {
* @param string $subtype - The type of plugin (submission or feedback)
* @param part_of_admin_tree $admin - The handle to the admin menu
* @param admin_settingpage $settings - The handle to current node in the navigation tree
* @param stdClass $module - The handle to the current module
* @param stdClass|plugininfo_mod $module - The handle to the current module
* @return None
*/
static function add_admin_assign_plugin_settings($subtype, part_of_admin_tree $admin, admin_settingpage $settings, stdClass $module) {
static function add_admin_assign_plugin_settings($subtype, part_of_admin_tree $admin, admin_settingpage $settings, $module) {
global $CFG;
$plugins = get_plugin_list_with_file($subtype, 'settings.php', false);
@@ -463,7 +463,7 @@ class assign_plugin_manager {
foreach ($pluginsbyname as $pluginname => $plugin) {
$settings = new admin_settingpage($subtype . '_'.$plugin,
$pluginname, 'moodle/site:config', !$module->visible);
$pluginname, 'moodle/site:config', $module->is_enabled() === false);
if ($admin->fulltree) {
$shortsubtype = substr($subtype, strlen('assign'));
include($CFG->dirroot . "/mod/assign/$shortsubtype/$plugin/settings.php");