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.

This commit is contained in:
jamiesensei
2008-05-09 06:06:29 +00:00
parent 49e6e996df
commit 6c90434d03
+3 -1
View File
@@ -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) {