Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / admin / roles / assign.html
blob2369b5d038ee7add23f356096e895e04d47bfb09
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 (" . $availableusers->_numOfRows . ")\">\n";
65 while ($user = rs_fetch_next_record($availableusers)) {
66 if (!isset($contextusers[$user->id])) {
67 $fullname = fullname($user, true);
68 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
69 $i++;
72 echo "</optgroup>\n";
74 } else {
75 if ($usercount > MAX_USERS_PER_PAGE) {
76 echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
77 .'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
78 } else {
79 while ($user = rs_fetch_next_record($availableusers)) {
80 if (!isset($contextusers[$user->id])) {
81 $fullname = fullname($user, true);
82 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
83 $i++;
88 if ($i==0) {
89 echo '<option/>'; // empty select breaks xhtml strict
92 </select>
93 <br />
94 <label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
95 <input type="text" name="searchtext" id="searchtext" size="30" value="<?php p($searchtext, true) ?>"
96 onfocus ="getElementById('assignform').add.disabled=true;
97 getElementById('assignform').remove.disabled=true;
98 getElementById('assignform').removeselect.selectedIndex=-1;
99 getElementById('assignform').addselect.selectedIndex=-1;"
100 onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
101 if (keyCode == 13) {
102 getElementById('assignform').previoussearch.value=1;
103 getElementById('assignform').submit();
104 } " />
105 <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
106 <?php
107 if (!empty($searchtext)) {
108 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
111 </td>
112 </tr>
113 </table>
114 </div>
115 </form>