moodle/admin/mnet/enr_course_enrol.html

105 lines
4.7 KiB
HTML
Raw Normal View History

2007-01-04 03:05:48 +00:00
2007-01-10 00:31:43 +00:00
<form id="assignform" method="post" action="">
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
2007-01-04 03:05:48 +00:00
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="host" value="<?php p($mnet_peer->id) ?>" />
2007-01-04 03:05:48 +00:00
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<table class="generaltable" border="0" cellpadding="5" cellspacing="0">
2007-01-04 03:05:48 +00:00
<tr>
<td valign="top">
2007-01-19 05:24:47 +00:00
<?php print_string('existingusers', 'role', count($mnetenrolledusers)); ?>
2007-01-04 03:05:48 +00:00
</td>
<td></td>
<td valign="top">
<?php print_string('potentialusers', 'role', $availablecount); ?>
2007-01-04 03:05:48 +00:00
</td>
</tr>
<tr>
<td valign="top">
2007-01-10 00:31:43 +00:00
<select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=false;
2007-01-10 00:31:43 +00:00
getElementById('assignform').addselect.selectedIndex=-1;">
2007-01-04 03:05:48 +00:00
<?php
foreach ($mnetenrolledusers as $enrolleduser) {
$fullname = fullname($enrolleduser, true);
echo "<option value=\"$enrolleduser->id\">".s($fullname)." (".s($enrolleduser->rolename).")</option>\n";
}
2007-01-04 03:05:48 +00:00
?>
</select></td>
<td valign="top">
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
<input name="remove" type="submit" id="remove" value="&rarr;" />
<br />
</td>
<td valign="top">
2007-01-10 00:31:43 +00:00
<select name="addselect[]" size="20" id="addselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=false;
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;">
2007-01-04 03:05:48 +00:00
<?php
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availablecount . ")\">\n";
foreach ($availableusers as $user) {
2007-01-04 03:05:48 +00:00
if (!isset($enrolledusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
echo "</optgroup>\n";
} else {
if ($availablecount > MAX_USERS_PER_PAGE) {
2007-01-04 03:05:48 +00:00
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
foreach ($availableusers as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
2007-01-04 03:05:48 +00:00
}
}
}
?>
</select>
<br />
<input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
2007-01-10 00:31:43 +00:00
onfocus ="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;
getElementById('assignform').addselect.selectedIndex=-1;"
2007-01-04 03:05:48 +00:00
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
getElementById('assignform').previoussearch.value=1;
getElementById('assignform').submit();
2007-01-04 03:05:48 +00:00
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
if (!empty($searchusers)) {
echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
}
?>
</td>
</tr>
<tr>
<td valign="top"><?php print_string('otherenrolledusers', 'mnet'); ?>:<br />
<ul>
<?php
foreach ($remtenrolledusers as $enrolleduser) {
$fullname = fullname($enrolleduser, true);
print '<li>'
. s($fullname) . ' (' . s($enrolleduser->rolename) . ') '
. s($enrolleduser->enroltype)."</li>\n";
}
?></ul></td>
<td valign="top"></td>
<td valign="top"></td>
</tr>
2007-01-04 03:05:48 +00:00
</table>
</div>
2007-01-04 03:05:48 +00:00
</form>