remove old readme
[atutor.git] / docs / themes / simplified-desktop / instructor / enrolment / index.tmpl.php
1
2 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
3         <input type="hidden" name="tab" value="<?php echo $this->current_tab; ?>"/>
4         <input type="hidden" name="course_id" value="<?php echo $this->course_id; ?>"/>
5         <div class="input-form">
6         <fieldset class="group_form"><legend class="group_form"><?php echo _AT('search'); ?></legend>
7                 <?php if (admin_authenticate(AT_ADMIN_PRIV_ENROLLMENT, TRUE)): ?>
8                         <div class="row">
9                                 <label for="course"><?php echo _AT('course'); ?></label><br/>
10                                 <select name="course_id" id="course">
11                                 <?php
12                                 
13                                 while ($courses_row = mysql_fetch_assoc($this->result)) {
14                                         if ($courses_row['course_id'] == $this->course_id) {
15                                                 echo '<option value="'.$courses_row['course_id'].'" selected="selected">'.validate_length($courses_row['title'], 45,VALIDATE_LENGTH_FOR_DISPLAY).'</option>';
16                                         } else {
17                                                 echo '<option value="'.$courses_row['course_id'].'">'.validate_length($courses_row['title'],45,VALIDATE_LENGTH_FOR_DISPLAY).'</option>';
18                                         }
19                                 }
20                                 ?></select>
21                         </div>
22                 <?php endif; ?>
23
24                 <div class="row">
25                         <label for="search"><?php echo _AT('search'); ?> (<?php echo _AT('login_name').', '._AT('first_name').', '._AT('second_name').', '._AT('last_name') .', '._AT('email'); ?>)</label><br />
26                         <input type="text" name="search" id="search" size="40" value="<?php echo htmlspecialchars($_GET['search']); ?>" />
27                         <fieldset>
28                         <legend><?php echo _AT('search_match'); ?>:</legend>
29                         <input type="radio" name="match" value="all" id="match_all" <?php echo $this->checked_match_all; ?> /><label for="match_all"><?php echo _AT('search_all_words'); ?></label> <input type="radio" name="match" value="one" id="match_one" <?php echo $this->checked_match_one; ?> /><label for="match_one"><?php echo _AT('search_any_word'); ?></label>
30                         </fieldset>
31                 </div>
32
33                 <div class="row buttons">
34                         <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>" />
35                         <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>" />
36                 </div>
37         </fieldset>
38         </div>
39 </form>
40
41 <?php print_paginator($this->page, $this->tab_counts[$this->current_tab], $this->page_string_w_tab . SEP . $this->order .'='. $this->col, $this->results_per_page); ?>
42
43 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="selectform">
44 <input type="hidden" name="tab" value="<?php echo $this->current_tab; ?>" />
45 <input type="hidden" name="course_id" value="<?php echo $this->course_id; ?>"/>
46
47 <ul id="subnavlist">
48         <?php for ($i = 0; $i< $this->num_tabs; $i++): ?>
49                 <?php if ($this->current_tab == $i): ?>
50                         <li class="active"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?tab=<?php echo $i.$this->page_string; ?>" class="active"><strong><?php echo _AT($this->tabs[$i]); ?> - <?php echo $this->tab_counts[$i]; ?></strong></a></li>
51                 <?php else: ?>
52                         <li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?tab=<?php echo $i.$this->page_string; ?>"><?php echo _AT($this->tabs[$i]); ?> - <?php echo $this->tab_counts[$i]; ?></a></li>
53                 <?php endif; ?>
54         <?php endfor; ?>
55 </ul>
56
57 <div class="table-surround">
58 <table class="data" summary="Student enrolment by login name, first name and last name"  >
59 <colgroup>
60         <?php if ($this->col == 'login'): ?>
61                 <col />
62                 <col class="sort" />
63                 <col span="4" />
64         <?php elseif($this->col == 'first_name'): ?>
65                 <col span="2" />
66                 <col class="sort" />
67                 <col span="3" />
68         <?php // REMOVED FOR MOBILE elseif($this->col == 'second_name'): ?>
69                 <!-- <col span="3" />
70                 <col class="sort" />
71                 <col span="2" /> -->
72         <?php elseif($this->col == 'last_name'): ?>
73                 <col span="4" />
74                 <col class="sort" />
75                 <col />
76         <?php // REMOVED FOR MOBILE elseif($this->col == 'email'): ?>
77                 <!-- <col span="5" />
78                 <col class="sort" /> -->
79         <?php endif; ?>
80 </colgroup>
81 <thead>
82 <tr>
83         <th scope="col" align="left"><input type="checkbox" value="<?php echo _AT('select_all'); ?>" id="all" title="<?php echo _AT('select_all'); ?>" name="selectall" onclick="CheckAll();" /></th>
84
85         <th scope="col"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?<?php echo $this->orders[$this->order]; ?>=login<?php echo $this->page_string_w_tab;?>"><?php echo _AT('login_name'); ?></a></th>
86
87         <th scope="col"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?<?php echo $this->orders[$this->order]; ?>=first_name<?php echo $this->page_string_w_tab;?>"><?php echo _AT('first_name'); ?></a></th>
88
89         <!-- REMOVED FOR MOBILE <th scope="col"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?<?php echo $this->orders[$this->order]; ?>=second_name<?php echo $this->page_string_w_tab;?>"><?php echo _AT('second_name'); ?></a></th>-->
90
91         <th scope="col"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?<?php echo $this->orders[$this->order]; ?>=last_name<?php echo $this->page_string_w_tab;?>"><?php echo _AT('last_name'); ?></a></th>
92
93         <!-- REMOVED FOR MOBILE <th scope="col"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?<?php echo $this->orders[$this->order]; ?>=email<?php echo $this->page_string_w_tab;?>"><?php echo _AT('email'); ?></a></th>-->
94 </tr>
95 </thead>
96 <tfoot>
97 <tr>
98         <td colspan="6">
99                 <?php if ($this->current_tab == 0): ?>
100                         <input type="submit" name="role"     value="<?php echo _AT('privileges');  ?>" /> 
101                         <input type="submit" name="unenroll" value="<?php echo _AT('remove');    ?>" /> 
102                         <input type="submit" name="alumni"   value="<?php echo _AT('mark_alumni'); ?>" />
103                 <?php elseif ($this->current_tab == 1): ?>
104                         <input type="submit" name="role" value="<?php echo _AT('privileges'); ?>" /> 
105                         <input type="submit" name="unenroll" value="<?php echo _AT('remove'); ?>" /> 
106
107                 <?php elseif ($this->current_tab == 2): ?>
108                         <input type="submit" name="enroll"   value="<?php echo _AT('enroll'); ?>" /> 
109                         <input type="submit" name="unenroll" value="<?php echo _AT('remove'); ?>" />
110                 
111                 <?php elseif ($this->current_tab == 3): ?>
112                         <input type="submit" name="enroll" value="<?php echo _AT('enroll'); ?>" /> 
113                         <input type="submit" name="unenroll" value="<?php echo _AT('remove'); ?>" />
114
115                 <?php elseif ($this->current_tab == 4): ?>
116                         <input type="submit" name="enroll"   value="<?php echo _AT('enroll'); ?>" /> 
117
118                 <?php endif; ?></td>
119 </tr>
120 </tfoot>
121 <tbody>
122 <?php if ($this->tab_counts[$this->current_tab]): ?>
123         <?php while ($row = mysql_fetch_assoc($this->enrollment_result)): ?>
124                 <tr onmousedown="document.selectform['m<?php echo $row['member_id']; ?>'].checked = !document.selectform['m<?php echo $row['member_id']; ?>'].checked; togglerowhighlight(this, 'm<?php echo $row['member_id']; ?>');" id="rm<?php echo $row['member_id']; ?>">
125                         <td><input type="checkbox" name="id[]" value="<?php echo $row['member_id']; ?>" id="m<?php echo $row['member_id']; ?>" onmouseup="this.checked=!this.checked" title="<?php echo AT_print($row['login'], 'members.login'); ?>" /></td>
126                         <td><?php echo AT_print($row['login'], 'members.login'); ?></td>
127                         <td><?php echo AT_print($row['first_name'], 'members.name'); ?></td>
128                 <!-- REMOVED FOR MOBILE <td><?php // echo AT_print($row['second_name'], 'members.name'); ?></td> -->
129                         <td><?php echo AT_print($row['last_name'], 'members.name'); ?></td>
130                 <!-- REMOVED FOR MOBILE <td><?php // echo AT_print($row['email'], 'members.email'); ?></td>-->
131                 </tr>
132         <?php endwhile; ?>
133 <?php else: ?>
134         <tr>
135                 <td colspan="6"><?php echo _AT('none_found'); ?></td>
136         </tr>
137 <?php endif; ?>
138 </tbody>
139 </table>
140 </div>
141 </form>