libdir.'/adminlib.php'); admin_externalpage_setup('mnetenrol'); $CFG->pagepath = 'admin/mnet'; require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class $enrolment = enrolment_factory::factory('mnet'); /// Otherwise fill and print the form. /// get language strings admin_externalpage_print_header(); print_box(get_string("remoteenrolhosts_desc", "mnet")); echo '
'; if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') { print_box(get_string('mnetdisabled','mnet')); } echo '
' . '' . '' . '' . '' . '' // . '' . ''; $hosts = $enrolment->list_remote_servers(); foreach ($hosts as $host) { $coursesurl = "$CFG->wwwroot/$CFG->admin/mnet/enr_courses.php?host={$host->id}&sesskey={$USER->sesskey}"; $coursecount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_course WHERE hostid={$host->id}"); if (empty($coursecount)) { $coursecount = '?'; } $enrolcount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_assignments WHERE hostid={$host->id}"); echo '' . "" . "" . "" // TODO: teach report/log/index.php to show per-host-logs // . '' . ''; } echo '
'.get_string('host', 'mnet').' '.get_string('enrolments', 'mnet').' '.get_string('courses', 'mnet').'  
{$host->name}$enrolcount$coursecount - ".get_string('editenrolments', 'mnet')."' // . get_string('logs', 'mnet').'
' . '
'; admin_externalpage_print_footer(); ?>