mnet: finish up UI for enrolment handling and hardcoded strings

This commit is contained in:
martinlanghoff 2007-01-19 06:51:24 +00:00
parent 8506af02d3
commit 20003335ce
6 changed files with 56 additions and 20 deletions

View File

@ -90,12 +90,15 @@
</tr>
<tr>
<td valign="top"><?php print_string('otherenrolledusers', 'mnet'); ?>:<br />
<ul>
<?php
foreach ($remtenrolledusers as $enrolleduser) {
$fullname = fullname($enrolleduser, true);
echo s($fullname) .', ('.s($enrolleduser->rolename) . ') '.s($enrolleduser->enroltype)."<br />\n";
print '<li>'
. s($fullname) . ' (' . s($enrolleduser->rolename) . ') '
. s($enrolleduser->enroltype)."</li>\n";
}
?></td>
?></ul></td>
<td valign="top"></td>
<td valign="top"></td>
</tr>

View File

@ -253,8 +253,10 @@ $strsearchresults = get_string('searchresults');
admin_externalpage_print_header($adminroot);
print_string('enrollingincourse', 'mnet', array(s($course->shortname), s($mnet_peer->name)));
print_string("description", "enrol_mnet");
print_box('<strong>' . s($mnet_peer->name) . ' : '
. s($course->shortname) .' '. s($course->fullname)
. '</strong><br />'
. get_string("enrolcourseenrol_desc", "mnet"));
echo "<hr />";

View File

@ -13,6 +13,7 @@
$enrolment = enrolment_factory::factory('mnet');
$mnethost = required_param('host', PARAM_INT);
$host = get_record('mnet_host', 'id', $mnethost);
$courses = $enrolment->fetch_remote_courses($mnethost);
@ -20,7 +21,8 @@
admin_externalpage_print_header($adminroot);
print_box(get_string("description", "enrol_mnet"));
print_box('<strong>' . s($host->name) . ' </strong><br />'
. get_string("enrolcourses_desc", "mnet"));
echo "<hr />";
@ -34,7 +36,10 @@
. "host={$mnethost}&amp;courseid={$course->id}&amp;sesskey={$USER->sesskey}";
print ('<tr>'
. "<td>$icon</td>"
. "<td ><a href=\"$link\">".s($course->shortname). '&nbsp;'.s($course->fullname). "</a></td>"
. "<td><a href=\"$link\">".s($course->fullname). "</a></td>"
. '</tr><tr>'
. '<td></td>'
. '<td>'.s($course->shortname). ' - ' .s($course->cat_name).'</td>'
. '</tr><tr>'
. '<td></td>'
. "<td align=\"left\" >{$course->summary}</td>"

View File

@ -28,12 +28,12 @@
print_box(get_string('mnetdisabled','mnet'));
}
print ('<table align="center">'
print ('<table align="center" cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >'
. '<tr>'
. '<th> Host </th>'
. '<th> Enrolments </th>'
. '<th> Courses </th>'
. '<th> &nbsp; </th>'
. '<th class="header c0"> '.get_string('host', 'mnet').' </th>'
. '<th class="header c1"> '.get_string('enrolments', 'mnet').' </th>'
. '<th class="header c2"> '.get_string('courses', 'mnet').' </th>'
. '<th class="header c3"> &nbsp; </th>'
. '</tr>');
$hosts = $enrolment->list_remote_servers();
foreach ($hosts as $host) {
@ -47,8 +47,8 @@
print ('<tr>'
. "<td><a href=\"{$coursesurl}\">{$host->name}</a></td>"
. "<td align=\"center\" >$enrolcount</td>"
. "<td align=\"center\" ><a href=\"{$coursesurl}\">$coursecount - edit</a></td>"
. '<td align="center" > <a href="">Logs</a> </td>'
. "<td align=\"center\" ><a href=\"{$coursesurl}\">$coursecount - ".get_string('editenrolments', 'mnet')."</a></td>"
. '<td align="center" > <a href="">'.get_string('logs', 'mnet').'</a> </td>'
. '</tr>');
}
print ('</table>');

View File

@ -2,10 +2,20 @@
// This file defines settingpages and externalpages under the "mnet" category
$ADMIN->add('mnet', new admin_externalpage('net', get_string('settings', 'mnet'), $CFG->wwwroot . '/admin/mnet/index.php', 'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', get_string('ssoaccesscontrol', 'mnet'), $CFG->wwwroot . '/admin/mnet/access_control.php', 'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('net', get_string('settings', 'mnet'),
$CFG->wwwroot . '/admin/mnet/index.php',
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('mnetpeers', 'mnet'), $CFG->wwwroot . '/admin/mnet/peers.php', 'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('mnetenrol', 'mnet'), $CFG->wwwroot . '/admin/mnet/enr_hosts.php', 'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', get_string('trustedhosts', 'mnet'), $CFG->wwwroot . '/admin/mnet/trustedhosts.php', 'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('mnetpeers', 'mnet'),
$CFG->wwwroot . '/admin/mnet/peers.php',
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', get_string('ssoaccesscontrol', 'mnet'),
$CFG->wwwroot . '/admin/mnet/access_control.php',
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('mnetenrol', 'mnet'),
$CFG->wwwroot . '/admin/mnet/enr_hosts.php',
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', get_string('trustedhosts', 'mnet'),
$CFG->wwwroot . '/admin/mnet/trustedhosts.php',
'moodle/site:config'));
?>

View File

@ -7,9 +7,9 @@ $string['yourhost'] = 'Your Host';
$string['yourpeers'] = 'Your Peers';
$string['settings'] = 'Settings';
$string['hostsettings'] = 'Host Settings';
$string['mnetpeers'] = 'Moodle network peers';
$string['mnetpeers'] = 'Peers';
$string['mnetservices'] = 'Moodle network services';
$string['trustedhosts'] = 'Trusted Hosts for XML-RPC';
$string['trustedhosts'] = 'XML-RPC hosts';
$string['trustedhostsexplain'] = '<p>The trusted hosts mechanism allows specific machines to
execute calls via XML-RPC to any part of the Moodle API. This
available for scripts to control Moodle behaviour and can be
@ -210,4 +210,20 @@ $string['ssoaclneeds'] = 'For this functionality to work, you must have Moodle N
$string['mnetdisabled'] = 'Moodle Network is <strong>disabled</strong>.';
$string['authmnetdisabled'] = 'Moodle Networking <em>Authentication plugin</em>is <strong>disabled</strong>.';
$string['authmnetautoadddisabled'] = '<em>Auto-add users</em> in Moodle Networking Authentication plugin is <strong>disabled</strong>.';
$string['mnetenrol'] = 'Enrolments';
$string['remoteenrolhosts_desc'] = 'Enrol and unenrol users from your Moodle installation
on Moodle Hosts that allow you to do so via the Moodle
Network enrolment plugin.';
$string['host'] = 'host';
$string['enrolments'] = 'enrolments';
$string['editenrolments'] = 'enrol';
$string['logs'] = 'logs';
$string['courses'] = 'courses';
$string['enrolcourses_desc'] = 'Courses offered for remote enrolment by this host.';
$string['enrolcourseenrol_desc'] = 'Enrol/unenrol users from this course using Moodle Network enrolments.
Note that users may have been enrolled in this course via other enrolment
methods if the remote hosts allows them. Such enrolments are listed under
<em>Other enrolled users</em>';
$string['host'] = 'host';
?>