MDL-12531, make the new member value available to all the affected plugins, thanks...
[moodle-linuxchix.git] / admin / roles / assign.html
blob8720db3cc6900b362f96973eed4e5dacbe47cae0
1 <form id="assignform" method="post" action="">
2 <div style="text-align:center;">
3 <label for="extendperiod"><?php print_string('enrolperiod') ?></label> <?php choose_from_menu($periodmenu, "extendperiod", $defaultperiod, $unlimitedperiod); ?>
4 <label for="extendbase"><?php print_string('startingfrom') ?></label> <?php choose_from_menu($basemenu, "extendbase", 3, ""); ?>
6 <input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
7 <input type="hidden" name="userid" value="<?php p($userid) ?>" />
8 <input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
9 <input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
10 <input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
11 <input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
12 <table summary="" style="margin-left:auto;margin-right:auto" border="0" cellpadding="5" cellspacing="0">
13 <tr>
14 <td valign="top">
15 <label for="removeselect"><?php print_string('existingusers', 'role', count($contextusers)); ?></label>
16 <br />
17 <select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
18 onfocus="getElementById('assignform').add.disabled=true;
19 getElementById('assignform').remove.disabled=false;
20 getElementById('assignform').addselect.selectedIndex=-1;">
22 <?php
23 $i = 0;
24 foreach ($contextusers as $contextuser) {
25 $fullname = fullname($contextuser, true);
26 if ($contextuser->hidden) {
27 $hidden=' ('.get_string('hiddenassign').') ';
28 } else {
29 $hidden="";
31 echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email.$hidden."</option>\n";
32 $i++;
34 if ($i==0) {
35 echo '<option/>'; // empty select breaks xhtml strict
39 </select></td>
40 <td valign="top">
41 <br />
42 <label title="<?php print_string('hiddenassign') ?>">
43 <input type="checkbox" name="hidden" value="1" />
44 <img src="<?php echo $CFG->pixpath; ?>/t/hide.gif" alt="<?php print_string('hiddenassign') ?>" class="hide-show-image" />
45 <?php helpbutton('hiddenassign', get_string('hiddenassign')); ?>
46 </label>
47 <?php check_theme_arrows(); ?>
48 <p class="arrow_button">
49 <input name="add" id="add" type="submit" value="<?php echo '&nbsp;'.$THEME->larrow.' &nbsp; &nbsp; '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
50 <br />
51 <input name="remove" id="remove" type="submit" value="<?php echo '&nbsp; '.$THEME->rarrow.' &nbsp; &nbsp; '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
52 </p>
53 </td>
54 <td valign="top">
55 <label for="addselect"><?php print_string('potentialusers', 'role', $usercount); ?></label>
56 <br />
57 <select name="addselect[]" size="20" id="addselect" multiple="multiple"
58 onfocus="getElementById('assignform').add.disabled=false;
59 getElementById('assignform').remove.disabled=true;
60 getElementById('assignform').removeselect.selectedIndex=-1;">
61 <?php
62 $i=0;
63 if (!empty($searchtext)) {
64 echo "<optgroup label=\"$strsearchresults (" . $usercount . ")\">\n";
65 while ($user = rs_fetch_next_record($availableusers)) {
66 $fullname = fullname($user, true);
67 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
68 $i++;
70 echo "</optgroup>\n";
72 } else {
73 if ($usercount > MAX_USERS_PER_PAGE) {
74 echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
75 .'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
76 } else {
77 while ($user = rs_fetch_next_record($availableusers)) {
78 $fullname = fullname($user, true);
79 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
80 $i++;
84 if ($i==0) {
85 echo '<option/>'; // empty select breaks xhtml strict
88 </select>
89 <br />
90 <label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
91 <input type="text" name="searchtext" id="searchtext" size="30" value="<?php p($searchtext, true) ?>"
92 onfocus ="getElementById('assignform').add.disabled=true;
93 getElementById('assignform').remove.disabled=true;
94 getElementById('assignform').removeselect.selectedIndex=-1;
95 getElementById('assignform').addselect.selectedIndex=-1;"
96 onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
97 if (keyCode == 13) {
98 getElementById('assignform').previoussearch.value=1;
99 getElementById('assignform').submit();
100 } " />
101 <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
102 <?php
103 if (!empty($searchtext)) {
104 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
107 </td>
108 </tr>
109 </table>
110 </div>
111 </form>