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. :-)
This commit is contained in:
+15
-8
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Allows the admin to create, delete and rename course categories
|
||||
|
||||
require_once("../config.php");
|
||||
require_once("../course/lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("../course/lib.php");
|
||||
|
||||
optional_variable($disable);
|
||||
optional_variable($enable);
|
||||
@@ -25,9 +25,10 @@
|
||||
$strdelete = get_string("delete");
|
||||
$strhide = get_string("hide");
|
||||
$strshow = get_string("show");
|
||||
$strsettings = get_string("settings");
|
||||
$stractivitymodule = get_string("activitymodule");
|
||||
|
||||
print_header("$site->shortname: $strmanagemodules", "$site->fullname",
|
||||
print_header("$site->shortname: $strmanagemodules", "$site->fullname",
|
||||
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $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 = "<a href=\"modules.php?delete=$module->name\">$strdelete</a>";
|
||||
|
||||
if (file_exists("$CFG->dirroot/mod/$module->name/config.php")) {
|
||||
$settings = "<a href=\"$CFG->wwwroot/mod/$module->name/config.php\">$strsettings</a>";
|
||||
} else {
|
||||
$settings = "";
|
||||
}
|
||||
|
||||
if ($module->visible) {
|
||||
$visible = "<a href=\"modules.php?hide=$module->name\" title=\"$strhide\">".
|
||||
"<img src=\"$pixpath/i/hide.gif\" align=\"absmiddle\" height=16 width=16 border=0></a>";
|
||||
@@ -171,7 +178,7 @@
|
||||
$visible = "";
|
||||
$class = "";
|
||||
}
|
||||
$table->data[] = array ("<p $class>$icon $modulename</p>", $visible, $delete);
|
||||
$table->data[] = array ("<p $class>$icon $modulename</p>", $visible, $delete, $settings);
|
||||
}
|
||||
print_table($table);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user