2 <form id=
"studentform" method=
"post" action=
"importstudents.php">
3 <input type=
"hidden" name=
"previoussearch" value=
"<?php echo $previoussearch ?>" />
4 <input type
="hidden" name
="sesskey" value
="<?php echo sesskey() ?>" />
5 <input type
="hidden" name
="id" value
="<?php echo $id?>" />
6 <table summary
="" align
="center" border
="0" cellpadding
="5" cellspacing
="0">
9 <label
for="removeselect"><?php
echo count($alreadycourses) . " ". $stralreadycourses ?></label>
11 <select name=
"removeselect[]" size=
"20" id=
"removeselect" multiple
12 onFocus=
"getElementById('studentform').add.disabled=true;
13 getElementById('studentform').remove.disabled=false;
14 getElementById('studentform').addselect.selectedIndex=-1;">
16 foreach ($alreadycourses as $course) {
17 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
22 <?php check_theme_arrows(); ?>
23 <p class=
"arrow_button">
24 <input name=
"add" id=
"add" type=
"submit" value=
"<?php echo ' '.$THEME->larrow.' '.get_string('add'); ?>" title
="<?php print_string('add'); ?>" />
26 <input name
="remove" id
="remove" type
="submit" value
="<?php echo ' '.$THEME->rarrow.' '.get_string('remove'); ?>" title
="<?php print_string('remove'); ?>" />
30 <label
for="addselect"><?php
echo $numcourses . " " . $strpotentialcourses ?></label>
32 <select name=
"addselect[]" size=
"20" id=
"addselect" multiple
33 onFocus=
"getElementById('studentform').add.disabled=false;
34 getElementById('studentform').remove.disabled=true;
35 getElementById('studentform').removeselect.selectedIndex=-1;">
38 if (!empty($searchcourses)) {
39 echo "<optgroup label=\"$strsearchresults (" . count($searchcourses) . ")\">\n";
40 foreach ($searchcourses as $course) {
41 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
45 if (!empty($courses)) {
46 if ($numcourses > MAX_COURSES_PER_PAGE
) {
47 echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
48 .'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
51 foreach ($courses as $course) {
52 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
59 <label for=
"searchtext" class=
"accesshide"><?php p($strsearch) ?></label>
60 <input type=
"text" name=
"searchtext" id=
"searchtext" size=
"30" value=
"<?php p($searchtext, true) ?>"
61 onFocus
="getElementById('studentform').add.disabled=true;
62 getElementById('studentform').remove.disabled=true;
63 getElementById('studentform').removeselect.selectedIndex=-1;
64 getElementById('studentform').addselect.selectedIndex=-1;"
65 onkeydown
= "var keyCode = event.which ? event.which : event.keyCode;
67 getElementById('studentform').previoussearch.value=1;
68 getElementById('studentform').submit();
70 <input name
="search" id
="search" type
="submit" value
="<?php p($strsearch) ?>" />
72 if (!empty($searchcourses)) {
73 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";