af1bb8cc9b14c54c2d66b4eda5820d37024d4f48
[atutor.git] / docs / themes / default / 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                         <br/>
28                         <?php echo _AT('search_match'); ?>:
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                 </div>
31
32                 <div class="row buttons">
33                         <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>" />
34                         <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>" />
35                 </div>
36         </fieldset>
37         </div>
38 </form>
39
40 <?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); ?>
41
42 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="selectform">
43 <input type="hidden" name="tab" value="<?php echo $this->current_tab; ?>" />
44 <input type="hidden" name="course_id" value="<?php echo $this->course_id; ?>"/>
45
46 <ul id="subnavlist">
47         <?php for ($i = 0; $i< $this->num_tabs; $i++): ?>
48                 <?php if ($this->current_tab == $i): ?>
49                         <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>
50                 <?php else: ?>
51                         <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>
52                 <?php endif; ?>
53         <?php endfor; ?>
54 </ul>
55
56
57 <table class="data" style="width:95%;" summary="List of students enrolled in course" rules="cols" >
58 <colgroup>
59         <?php if ($this->col == 'login'): ?>
60                 <col />
61                 <col class="sort" />
62                 <col span="4" />
63         <?php elseif($this->col == 'first_name'): ?>
64                 <col span="2" />
65                 <col class="sort" />
66                 <col span="3" />
67         <?php elseif($this->col == 'second_name'): ?>
68                 <col span="3" />
69                 <col class="sort" />
70                 <col span="2" />
71         <?php elseif($this->col == 'last_name'): ?>
72                 <col span="4" />
73                 <col class="sort" />
74                 <col />
75         <?php elseif($this->col == 'email'): ?>
76                 <col span="5" />
77                 <col class="sort" />
78         <?php endif; ?>
79 </colgroup>
80 <thead>
81 <tr>
82         <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>
83
84         <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>
85
86         <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>
87
88         <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>
89
90         <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>
91
92         <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>
93 </tr>
94 </thead>
95 <tfoot>
96 <tr>
97         <td colspan="6">
98                 <?php if ($this->current_tab == 0): ?>
99                         <input type="submit" name="role"     value="<?php echo _AT('privileges');  ?>" /> 
100                         <input type="submit" name="unenroll" value="<?php echo _AT('remove');    ?>" /> 
101                         <input type="submit" name="alumni"   value="<?php echo _AT('mark_alumni'); ?>" />
102                 <?php elseif ($this->current_tab == 1): ?>
103                         <input type="submit" name="role" value="<?php echo _AT('privileges'); ?>" /> 
104                         <input type="submit" name="unenroll" value="<?php echo _AT('remove'); ?>" /> 
105
106                 <?php elseif ($this->current_tab == 2): ?>
107                         <input type="submit" name="enroll"   value="<?php echo _AT('enroll'); ?>" /> 
108                         <input type="submit" name="unenroll" value="<?php echo _AT('remove'); ?>" />
109                 
110                 <?php elseif ($this->current_tab == 3): ?>
111                         <input type="submit" name="enroll" value="<?php echo _AT('enroll'); ?>" /> 
112                         <input type="submit" name="unenroll" value="<?php echo _AT('remove'); ?>" />
113
114                 <?php elseif ($this->current_tab == 4): ?>
115                         <input type="submit" name="enroll"   value="<?php echo _AT('enroll'); ?>" /> 
116
117                 <?php endif; ?></td>
118 </tr>
119 </tfoot>
120 <tbody>
121 <?php if ($this->tab_counts[$this->current_tab]): ?>
122         <?php while ($row = mysql_fetch_assoc($this->enrollment_result)): ?>
123                 <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']; ?>">
124                         <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>
125                         <td><?php echo AT_print($row['login'], 'members.login'); ?></td>
126                         <td><?php echo AT_print($row['first_name'], 'members.name'); ?></td>
127                         <td><?php echo AT_print($row['second_name'], 'members.name'); ?></td>
128                         <td><?php echo AT_print($row['last_name'], 'members.name'); ?></td>
129                         <td><?php echo AT_print($row['email'], 'members.email'); ?></td>
130                 </tr>
131         <?php endwhile; ?>
132 <?php else: ?>
133         <tr>
134                 <td colspan="6"><?php echo _AT('none_found'); ?></td>
135         </tr>
136 <?php endif; ?>
137 </tbody>
138 </table>
139 </form>