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-19 02:51:18 +00:00
|
|
|
print ('<table align="center" >');
|
|
|
|
|
|
|
|
$icon = "<img src=\"$CFG->pixpath/i/course.gif\"".
|
|
|
|
" class=\"icon\" alt=\"".get_string("course")."\" />";
|
2007-01-04 03:05:48 +00:00
|
|
|
|
|
|
|
foreach ($courses as $course) {
|
2007-01-19 02:51:18 +00:00
|
|
|
$link = $CFG->wwwroot . '/admin/mnet/enr_course_enrol.php?'
|
|
|
|
. "host={$mnethost}&courseid={$course->id}&sesskey={$USER->sesskey}";
|
2007-01-04 03:05:48 +00:00
|
|
|
print ('<tr>'
|
2007-01-19 02:51:18 +00:00
|
|
|
. "<td>$icon</td>"
|
|
|
|
. "<td ><a href=\"$link\">".s($course->shortname). ' '.s($course->fullname). "</a></td>"
|
2007-01-04 03:05:48 +00:00
|
|
|
. '</tr><tr>'
|
2007-01-19 02:51:18 +00:00
|
|
|
. '<td></td>'
|
2007-01-04 03:05:48 +00:00
|
|
|
. "<td align=\"left\" >{$course->summary}</td>"
|
|
|
|
. '</tr>');
|
|
|
|
}
|
|
|
|
print ('</table>');
|
|
|
|
|
|
|
|
admin_externalpage_print_footer($adminroot);
|
|
|
|
|
|
|
|
?>
|