enrol, PARAM_ALPHA); require_login(); if (!$site = get_site()) { redirect("index.php"); } if (!isadmin()) { error("Only the admin can use this page"); } if (!confirm_sesskey()) { error(get_string('confirmsesskeybad', 'error')); } require_once("$CFG->dirroot/enrol/$enrol/enrol.php"); /// Open the class $enrolment = new enrolment_plugin(); /// If data submitted, then process and store. if ($frm = data_submitted()) { if ($enrolment->process_config($frm)) { set_config('enrol', $frm->enrol); redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1); } } else { $frm = $CFG; } /// Otherwise fill and print the form. /// get language strings $str = get_strings(array('enrolments', 'users', 'administration', 'settings')); $modules = get_list_of_plugins("enrol"); foreach ($modules as $module) { $options[$module] = get_string("enrolname", "enrol_$module"); } asort($options); print_header("$site->shortname: $str->enrolments", "$site->fullname", "$str->administration -> $str->users -> $str->enrolments"); echo "
"; print_simple_box_end(); print_footer(); exit; ?>