Use $this->error for only error report
[moodle-linuxchix.git] / course / importstudents.html
blobab35b54cfd0d77a636214e53e455a2a0cb201f22
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">
7 <tr>
8 <td valign="top">
9 <label for="removeselect"><?php echo count($alreadycourses) . " ". $stralreadycourses ?></label>
10 <br />
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;">
15 <?php
16 foreach ($alreadycourses as $course) {
17 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
20 </select></td>
21 <td valign="top">
22 <?php check_theme_arrows(); ?>
23 <p class="arrow_button">
24 <input name="add" id="add" type="submit" value="<?php echo '&nbsp;'.$THEME->larrow.' &nbsp; &nbsp; '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
25 <br />
26 <input name="remove" id="remove" type="submit" value="<?php echo '&nbsp; '.$THEME->rarrow.' &nbsp; &nbsp; '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
27 </p>
28 </td>
29 <td valign="top">
30 <label for="addselect"><?php echo $numcourses . " " . $strpotentialcourses ?></label>
31 <br />
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;">
36 <?php
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";
43 echo "</optgroup>\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";
50 else {
51 foreach ($courses as $course) {
52 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
57 </select>
58 <br />
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;
66 if (keyCode == 13) {
67 getElementById('studentform').previoussearch.value=1;
68 getElementById('studentform').submit();
69 } " />
70 <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
71 <?php
72 if (!empty($searchcourses)) {
73 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
76 </td>
77 </tr>
78 </table>
79 </form>