| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?PHP // $Id: enr_courses.php,v 1.8.4.2 2008/04/02 06:09:58 dongsheng Exp $ 2 // enrol_config.php - allows admin to edit all enrollment variables 3 // Yes, enrol is correct English spelling. 4 5 require_once(dirname(__FILE__) . "/../../config.php"); 6 require_once($CFG->libdir.'/adminlib.php'); 7 8 if (!confirm_sesskey()) { 9 print_error('confirmsesskeybad', 'error'); 10 } 11 12 13 admin_externalpage_setup('mnetenrol'); 14 $CFG->pagepath = 'admin/mnet'; 15 16 require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class 17 $enrolment = enrolment_factory::factory('mnet'); 18 19 $mnethost = required_param('host', PARAM_INT); 20 $host = get_record('mnet_host', 'id', $mnethost); 21 22 $courses = $enrolment->fetch_remote_courses($mnethost); 23 24 /// Print the page 25 26 admin_externalpage_print_header(); 27 28 print_box('<strong>' . s($host->name) . ' </strong><br />' 29 . get_string("enrolcourses_desc", "mnet")); 30 31 echo '<hr />'; 32 33 echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->' 34 . '<table class="generaltable">'; 35 36 $icon = "<img src=\"$CFG->pixpath/i/course.gif\"". 37 " class=\"icon\" alt=\"".get_string("course")."\" />"; 38 39 foreach ($courses as $course) { 40 $link = "$CFG->wwwroot/$CFG->admin/mnet/enr_course_enrol.php?" 41 . "host={$mnethost}&courseid={$course->id}&sesskey={$USER->sesskey}"; 42 echo '<tr>' 43 . "<td>$icon</td>" 44 . "<td><a href=\"$link\">".format_string($course->fullname). "</a></td>" 45 . '</tr><tr>' 46 . '<td></td>' 47 . '<td>'.format_string($course->shortname). ' - ' .format_string($course->cat_name).'</td>' 48 . '</tr><tr>' 49 . '<td></td>' 50 . "<td align=\"left\" >{$course->summary}</td>" 51 . '</tr>'; 52 } 53 echo '</table></div>'; 54 55 admin_externalpage_print_footer(); 56 57 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |