From 6c90434d030dbd5ff9782c6bf366acc903fa9225 Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Fri, 9 May 2008 06:06:29 +0000 Subject: [PATCH] MDL-14637 "allow activity modules to add sub menus of settings pages to admin menu" and MDL-14565 "allow quiz reports to add configuration settings to the admin tree" added a mechanism to admin/settings/plugins.php to allow modules to include a file settingstree.php instead of settings.php which will allow for more flexibility of what a module can add to the admin settings menu. --- admin/settings/plugins.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/settings/plugins.php b/admin/settings/plugins.php index f3ff0f7b7a3..bcf2269eaa0 100644 --- a/admin/settings/plugins.php +++ b/admin/settings/plugins.php @@ -20,7 +20,9 @@ if ($hassiteconfig) { foreach ($modulebyname as $strmodulename=>$module) { $modulename = $module->name; - if (file_exists($CFG->dirroot.'/mod/'.$modulename.'/settings.php')) { + if (file_exists($CFG->dirroot.'/mod/'.$modulename.'/settingstree.php')) { + include($CFG->dirroot.'/mod/'.$modulename.'/settingstree.php'); + } else if (file_exists($CFG->dirroot.'/mod/'.$modulename.'/settings.php')) { // do not show disabled modules in tree, keep only settings link on manage page $settings = new admin_settingpage('modsetting'.$modulename, $strmodulename, 'moodle/site:config', !$module->visible); if ($ADMIN->fulltree) {