adding some strings
[moodle-linuxchix.git] / admin / mnet / enr_course_enrol.html
blob67c5cb169ced369dc98b8d8facd16860c311ce9d
2 <form id="assignform" method="post" action="">
3 <div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
4 <input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
5 <input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
6 <input type="hidden" name="host" value="<?php p($mnet_peer->id) ?>" />
7 <input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
8 <table class="generaltable" border="0" cellpadding="5" cellspacing="0">
9 <tr>
10 <td valign="top">
11 <?php print_string('existingusers', 'role', count($mnetenrolledusers)); ?>
12 </td>
13 <td></td>
14 <td valign="top">
15 <?php print_string('potentialusers', 'role', $availableusers->_numOfRows); ?>
16 </td>
17 </tr>
18 <tr>
19 <td valign="top">
20 <select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
21 onfocus="getElementById('assignform').add.disabled=true;
22 getElementById('assignform').remove.disabled=false;
23 getElementById('assignform').addselect.selectedIndex=-1;">
24 <?php
25 foreach ($mnetenrolledusers as $enrolleduser) {
26 $fullname = fullname($enrolleduser, true);
27 echo "<option value=\"$enrolleduser->id\">".s($fullname)." (".s($enrolleduser->rolename).")</option>\n";
31 </select></td>
32 <td valign="top">
33 <br />
34 <input name="add" type="submit" id="add" value="&larr;" />
35 <br />
36 <input name="remove" type="submit" id="remove" value="&rarr;" />
37 <br />
38 </td>
39 <td valign="top">
40 <select name="addselect[]" size="20" id="addselect" multiple="multiple"
41 onfocus="getElementById('assignform').add.disabled=false;
42 getElementById('assignform').remove.disabled=true;
43 getElementById('assignform').removeselect.selectedIndex=-1;">
44 <?php
46 if (!empty($searchtext)) {
47 echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
48 while ($user = rs_fetch_next_record($availableusers)) {
49 if (!isset($enrolledusers[$user->id])) {
50 $fullname = fullname($user, true);
51 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
54 echo "</optgroup>\n";
56 } else {
57 if ($availableusers->_numOfRows > MAX_USERS_PER_PAGE) {
58 echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
59 .'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
60 } else {
61 while ($user = rs_fetch_next_record($availableusers)) {
62 $fullname = fullname($user, true);
63 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
68 </select>
69 <br />
70 <input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
71 onfocus ="getElementById('assignform').add.disabled=true;
72 getElementById('assignform').remove.disabled=true;
73 getElementById('assignform').removeselect.selectedIndex=-1;
74 getElementById('assignform').addselect.selectedIndex=-1;"
75 onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
76 if (keyCode == 13) {
77 getElementById('assignform').previoussearch.value=1;
78 getElementById('assignform').submit();
79 } " />
80 <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
81 <?php
82 if (!empty($searchusers)) {
83 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
86 </td>
87 </tr>
88 <tr>
89 <td valign="top"><?php print_string('otherenrolledusers', 'mnet'); ?>:<br />
90 <ul>
91 <?php
92 foreach ($remtenrolledusers as $enrolleduser) {
93 $fullname = fullname($enrolleduser, true);
94 print '<li>'
95 . s($fullname) . ' (' . s($enrolleduser->rolename) . ') '
96 . s($enrolleduser->enroltype)."</li>\n";
98 ?></ul></td>
99 <td valign="top"></td>
100 <td valign="top"></td>
101 </tr>
102 </table>
103 </div>
104 </form>