mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00

AMOS START MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self] MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self] MOV [enrolstartdate,core],[enrolstartdate,enrol_self] MOV [enrolenddate,core],[enrolenddate,enrol_self] CPY [welcometocourse,core],[welcometocourse,enrol_self] CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self] MOV [notenrollable,core],[notenrollable,core_enrol] MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self] MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self] MOV [coursemanager,core_admin],[coursecontact,core_admin] MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin] MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual] MOV [enrolme,core],[enrolme,core_enrol] MOV [unenrol,core],[unenrol,core_enrol] MOV [unenrolme,core],[unenrolme,core_enrol] MOV [enrolmentnew,core],[enrolmentnew,core_enrol] MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol] MOV [enrolments,core],[enrolments,core_enrol] MOV [enrolperiod,core],[enrolperiod,core_enrol] MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol] AMOS END
56 lines
1.9 KiB
PHP
56 lines
1.9 KiB
PHP
<?PHP
|
|
// enrol_config.php - allows admin to edit all enrolment variables
|
|
// Yes, enrol is correct English spelling.
|
|
|
|
die('TODO: ment enrolments are not reimplemented yet, sorry.');
|
|
|
|
require_once(dirname(__FILE__) . "/../../config.php");
|
|
require_once($CFG->libdir.'/adminlib.php');
|
|
require_once($CFG->dirroot.'/mnet/lib.php');
|
|
|
|
if (!confirm_sesskey()) {
|
|
print_error('confirmsesskeybad', 'error');
|
|
}
|
|
|
|
|
|
admin_externalpage_setup('mnetenrol');
|
|
|
|
$enrolment = enrol_get_plugin('mnet');
|
|
|
|
$mnethost = required_param('host', PARAM_INT);
|
|
$host = $DB->get_record('mnet_host', array('id'=>$mnethost));
|
|
|
|
$courses = $enrolment->fetch_remote_courses($mnethost);
|
|
|
|
/// Print the page
|
|
|
|
echo $OUTPUT->header();
|
|
|
|
echo $OUTPUT->box('<strong>' . s($host->name) . ' </strong><br />'
|
|
. get_string("enrolcourses_desc", "mnet"));
|
|
|
|
echo '<hr />';
|
|
|
|
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
|
|
. '<table class="generaltable">';
|
|
|
|
$icon = "<img src=\"" . $OUTPUT->pix_url('i/course') . "\"".
|
|
" 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=".sesskey();
|
|
echo '<tr>'
|
|
. "<td>$icon</td>"
|
|
. "<td><a href=\"$link\">".format_string($course->fullname). "</a></td>"
|
|
. '</tr><tr>'
|
|
. '<td></td>'
|
|
. '<td>'.format_string($course->shortname). ' - ' .format_string($course->cat_name).'</td>'
|
|
. '</tr><tr>'
|
|
. '<td></td>'
|
|
. "<td align=\"left\" >{$course->summary}</td>"
|
|
. '</tr>';
|
|
}
|
|
echo '</table></div>';
|
|
|
|
echo $OUTPUT->footer();
|