2 <form name=
"studentform" 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 align
="center" border
="0" cellpadding
="5" cellspacing
="0">
9 <?php
echo count($alreadycourses) . " ". $stralreadycourses ?>
13 <?php echo $numcourses . " " . $strpotentialcourses ?>
18 <select name=
"removeselect[]" size=
"20" id=
"removeselect" multiple
19 onFocus=
"document.studentform.add.disabled=true;
20 document.studentform.remove.disabled=false;
21 document.studentform.addselect.selectedIndex=-1;">
23 foreach ($alreadycourses as $course) {
24 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
30 <input name=
"add" type=
"submit" id=
"add" value=
"←" />
32 <input name=
"remove" type=
"submit" id=
"remove" value=
"→" />
36 <select name=
"addselect[]" size=
"20" id=
"addselect" multiple
37 onFocus=
"document.studentform.add.disabled=false;
38 document.studentform.remove.disabled=true;
39 document.studentform.removeselect.selectedIndex=-1;">
42 if (!empty($searchcourses)) {
43 echo "<optgroup label=\"$strsearchresults (" . count($searchcourses) . ")\">\n";
44 foreach ($searchcourses as $course) {
45 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
49 if (!empty($courses)) {
50 if ($numcourses > MAX_COURSES_PER_PAGE
) {
51 echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
52 .'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
55 foreach ($courses as $course) {
56 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
63 <input type=
"text" name=
"searchtext" size=
"30" value=
"<?php p($searchtext, true) ?>"
64 onFocus
="document.studentform.add.disabled=true;
65 document.studentform.remove.disabled=true;
66 document.studentform.removeselect.selectedIndex=-1;
67 document.studentform.addselect.selectedIndex=-1;"
68 onkeydown
= "var keyCode = event.which ? event.which : event.keyCode;
70 document.studentform.previoussearch.value=1;
71 document.studentform.submit();
73 <input name
="search" id
="search" type
="submit" value
="<?php p($strsearch) ?>" />
75 if (!empty($searchcourses)) {
76 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";