In Moodle 2.5, the following code in enrol\index.php
, line #57, is responsible for retrieving all the content to be displayed:
foreach($enrolinstances as $instance) {
if (!isset($enrols[$instance->enrol])) {
continue;
}
$form = $enrols[$instance->enrol]->enrol_page_hook($instance);
if ($form) {
$forms[$instance->id] = $form;
}
}
The actual content is printed to the users on #line 90 with
foreach ($forms as $form) {
echo $form;
}
Anywhere around here you can inject custom content ..., ideally, your code should go after the header and before the footer, e.g.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('enrolmentoptions','enrol'));
... your code goes here
echo $OUTPUT->footer();