From 2fa3074976be1535a38bb4115ccffc39404823da Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 25 Jul 2004 14:09:06 +0000 Subject: [PATCH] Getting this into so I can sort it out --- admin/enrol.php | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 admin/enrol.php diff --git a/admin/enrol.php b/admin/enrol.php new file mode 100644 index 0000000000..d95d8fe36e --- /dev/null +++ b/admin/enrol.php @@ -0,0 +1,75 @@ +enrol; + } + + require_once("$CFG->dirroot/enrol/$enrolname/enrol.php"); /// Open the class + + $enrolment = new enrolment_plugin(); + + +/// If data submitted, then process and store. + + if ($config = data_submitted()) { + if ($enrolment->process_config($config)) { + redirect("enrol.php", get_string("changessaved"), 1); + } + } + +/// Otherwise fill and print the form. + + $str = get_strings(array('enrolments', 'users', 'administration')); + + if (empty($config)) { + $page->config = $CFG; + } else { + $page->config = $config; + } + + $modules = get_list_of_plugins("enrol"); + foreach ($modules as $module) { + $page->options[$module] = get_string("enrolname", "enrol_$module"); + } + asort($page->options); + + $form = $enrolment->config_form($page); + + print_header("$site->shortname: $str->enrolments", "$site->fullname", + "$str->administration -> + $str->users -> $str->enrolments"); + + print_heading($page->options[$CFG->enrol]); + + echo "

"; + echo "NOT COMPLETE"; + echo "

"; + echo "

framename}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">"; + print_string("chooseauthmethod","auth"); + + choose_from_menu ($options, "auth", $auth, "","document.location='auth.php?auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", ""); + + echo "

"; + + + + + print_footer(); + + exit; +?> -- 2.39.5