2007-01-04 03:05:48 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
// enrol_config.php - allows admin to edit all enrollment variables
|
|
|
|
// Yes, enrol is correct English spelling.
|
|
|
|
|
|
|
|
require_once(dirname(__FILE__) . "/../../config.php");
|
|
|
|
require_once($CFG->libdir.'/adminlib.php');
|
|
|
|
|
|
|
|
$adminroot = admin_get_root();
|
2007-01-18 04:48:35 +00:00
|
|
|
admin_externalpage_setup('mnetenrol', $adminroot);
|
|
|
|
$CFG->pagepath = 'admin/mnet';
|
2007-01-04 03:05:48 +00:00
|
|
|
|
|
|
|
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
|
|
|
|
$enrolment = enrolment_factory::factory('mnet');
|
|
|
|
|
|
|
|
$mnethost = required_param('host', PARAM_INT);
|
|
|
|
|
|
|
|
$courses = $enrolment->fetch_remote_courses($mnethost);
|
|
|
|
|
2007-01-18 04:48:35 +00:00
|
|
|
/// Print the page
|
2007-01-04 03:05:48 +00:00
|
|
|
|
|
|
|
admin_externalpage_print_header($adminroot);
|
|
|
|
|
2007-01-18 04:48:35 +00:00
|
|
|
print_box(get_string("description", "enrol_mnet"));
|
2007-01-04 03:05:48 +00:00
|
|
|
|
|
|
|
echo "<hr />";
|
|
|
|
|
2007-01-09 02:31:22 +00:00
|
|
|
print ('<table align="center">');
|
2007-01-04 03:05:48 +00:00
|
|
|
|
|
|
|
foreach ($courses as $course) {
|
|
|
|
print ('<tr>'
|
2007-01-18 04:48:35 +00:00
|
|
|
. "<td colspan=\"2\"><a href=\"{$CFG->wwwroot}/admin/mnet/enr_course_enrol.php?host={$mnethost}&courseid={$course->id}&sesskey={$USER->sesskey}\">{$course->fullname}</a></td>"
|
2007-01-04 03:05:48 +00:00
|
|
|
. '</tr><tr>'
|
|
|
|
. "<td align=\"left\" valign=\"top\">{$course->shortname}<br />"
|
|
|
|
. '</td>'
|
|
|
|
. "<td align=\"left\" >{$course->summary}</td>"
|
|
|
|
. '</tr>');
|
|
|
|
}
|
|
|
|
print ('</table>');
|
|
|
|
|
|
|
|
admin_externalpage_print_footer($adminroot);
|
|
|
|
|
|
|
|
?>
|