From: moodler Date: Mon, 18 Aug 2003 17:21:53 +0000 (+0000) Subject: Code to enable config.html files in the modules. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bda11d2acd25ff943d993ca86c999faa632f4a87;p=moodle.git Code to enable config.html files in the modules. --- diff --git a/admin/module.php b/admin/module.php new file mode 100644 index 0000000000..07e7e0ff79 --- /dev/null +++ b/admin/module.php @@ -0,0 +1,53 @@ + $value) { + set_config($name, $value); + } + redirect("$CFG->wwwroot/$CFG->admin/modules.php", get_string("changessaved"), 1); + exit; + } + +/// Otherwise print the form. + + require_variable($module); + + require_once("$CFG->dirroot/mod/$module/lib.php"); + + + $stradmin = get_string("administration"); + $strconfiguration = get_string("configuration"); + $strmanagemodules = get_string("managemodules"); + $strmodulename = get_string("modulename", $module); + + print_header("$site->shortname: $strconfigvariables", $site->fullname, + "$stradmin -> ". + "$strconfiguration -> ". + "$strmanagemodules -> $strmodulename", $focus); + + print_heading($strmodulename); + + print_simple_box_start("center", "", "$THEME->cellheading"); + include("$CFG->wwwroot/mod/$module/config.html"); + print_simple_box_end(); + + print_footer(); + +?> diff --git a/admin/modules.php b/admin/modules.php index c43ae811e0..9e9d75095b 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -160,8 +160,8 @@ $delete = "name\">$strdelete"; - if (file_exists("$CFG->dirroot/mod/$module->name/config.php")) { - $settings = "wwwroot/mod/$module->name/config.php\">$strsettings"; + if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) { + $settings = "name\">$strsettings"; } else { $settings = ""; }