libdir.'/adminlib.php'); admin_externalpage_setup('enrolment'); $enrol = required_param('enrol', PARAM_ALPHA); $PAGE->set_pagetype('admin-enrol-' . $enrol); require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class $enrolment = enrolment_factory::factory($enrol); /// If data submitted, then process and store. if ($frm = data_submitted()) { if (!confirm_sesskey()) { print_error('confirmsesskeybad', 'error'); } if ($enrolment->process_config($frm)) { redirect("enrol.php?sesskey=".sesskey(), get_string("changessaved"), 1); } } else { $frm = $CFG; } /// Otherwise fill and print the form. /// get language strings $str = get_strings(array('enrolmentplugins', 'configuration', 'users', 'administration')); unset($options); $modules = get_plugin_list('enrol'); foreach ($modules as $module => $enroldir) { $options[$module] = get_string("enrolname", "enrol_$module"); } asort($options); echo $OUTPUT->header(); echo "
"; echo $OUTPUT->footer(); exit;