From: moodler Date: Thu, 24 Jul 2003 12:09:32 +0000 (+0000) Subject: If modules have a config.php file in them then a link to this is X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4e29914577f9ead7a3bea9956f987eb786b0d263;p=moodle.git If modules have a config.php file in them then a link to this is printed in the modules screen. These config.php screens presumably allow the setting of site-wide parameters for modules. Thanks to Mad Alex. :-) --- diff --git a/admin/modules.php b/admin/modules.php index e76b32684b..93d0ee2c4f 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -1,8 +1,8 @@ shortname: $strmanagemodules", "$site->fullname", + print_header("$site->shortname: $strmanagemodules", "$site->fullname", "admin/index.php\">$stradministration -> $strmanagemodules"); print_heading($strmanagemodules); @@ -145,10 +146,10 @@ $modpixpath = "../theme/$CFG->theme/pix/mod"; } - $table->head = array ($stractivitymodule, "$strhide/$strshow", $strdelete); - $table->align = array ("LEFT", "CENTER", "CENTER"); - $table->wrap = array ("NOWRAP", "", ""); - $table->size = array ("100%", "10", "10"); + $table->head = array ($stractivitymodule, "$strhide/$strshow", $strdelete, $strsettings); + $table->align = array ("LEFT", "CENTER", "CENTER", "CENTER"); + $table->wrap = array ("NOWRAP", "", "",""); + $table->size = array ("100%", "10", "10","12"); $table->width = "100"; foreach ($modulebyname as $modulename => $module) { @@ -157,6 +158,12 @@ $delete = "name\">$strdelete"; + if (file_exists("$CFG->dirroot/mod/$module->name/config.php")) { + $settings = "wwwroot/mod/$module->name/config.php\">$strsettings"; + } else { + $settings = ""; + } + if ($module->visible) { $visible = "name\" title=\"$strhide\">". ""; @@ -171,7 +178,7 @@ $visible = ""; $class = ""; } - $table->data[] = array ("

$icon $modulename

", $visible, $delete); + $table->data[] = array ("

$icon $modulename

", $visible, $delete, $settings); } print_table($table);