libdir.'/adminlib.php'); if (!confirm_sesskey()) { print_error('confirmsesskeybad', 'error'); } 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'); $mnethost = required_param('host', PARAM_INT); $host = get_record('mnet_host', 'id', $mnethost); $courses = $enrolment->fetch_remote_courses($mnethost); /// Print the page admin_externalpage_print_header(); print_box('' . s($host->name) . '
' . get_string("enrolcourses_desc", "mnet")); echo '
'; echo '
' . ''; $icon = "pixpath/i/course.gif\"". " class=\"icon\" alt=\"".get_string("course")."\" />"; foreach ($courses as $course) { $link = "$CFG->wwwroot/$CFG->admin/mnet/enr_course_enrol.php?" . "host={$mnethost}&courseid={$course->id}&sesskey={$USER->sesskey}"; echo '' . "" . "" . '' . '' . '' . '' . '' . "" . ''; } echo '
$icon".format_string($course->fullname). "
'.format_string($course->shortname). ' - ' .format_string($course->cat_name).'
{$course->summary}
'; admin_externalpage_print_footer(); ?>