4 * enrolment_factory is used to "manufacture" an instance of required enrolment plugin.
7 class enrolment_factory
{
8 function factory($enrol = '') {
13 if (file_exists("$CFG->dirroot/enrol/$enrol/enrol.php")) {
14 require_once("$CFG->dirroot/enrol/$enrol/enrol.php");
15 $class = "enrolment_plugin_$enrol";
18 trigger_error("$CFG->dirroot/enrol/$enrol/enrol.php does not exist");
19 error("$CFG->dirroot/enrol/$enrol/enrol.php does not exist");