<?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);
$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);
$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) {
$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>";
$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);