move code up one directory
[atutor.git] / themes / default / instructor / assignments / add_assignment.tmpl.php
1
2 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
3 <input type="hidden" name="id" value="<?php echo $this->id ?>" />
4 <div class="input-form">        
5         <fieldset class="group_form"><legend class="group_form"><?php echo _AT('add_assignment'); ?></legend>
6         <div class="row">
7                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="title"><?php  echo _AT('title'); ?></label><br/>
8                 <input type="text" name="title" size="50" id="title" value="<?php echo AT_print($this->title, 'assignment.title'); ?>" />
9         </div>
10
11         <div class="row">
12                 <label for="assignto"><?php  echo _AT('assign_to'); ?></label><br/>
13
14                 <?php // Are we editing an assignment?
15                         if ($this->id != '0'){
16                                 // editing an existing assignment 
17                                 if ($this->assign_to == '0'){ 
18                                         echo _AT('all_students'); 
19                                 } else { // name of group goes here
20                                         
21                                         $type_row = mysql_fetch_assoc($this->result_group);
22                                         echo $type_row['title'];
23                                 }
24                                 ?>
25                         <?php } else { // creating a new assignment
26                         ?>
27                                 <select name="assign_to" size="5" id="assignto">
28                                         <option value="0" <?php if ($this->assign_to == '0'){ echo 'selected="selected"'; } ?> label="<?php  echo _AT('all_students'); ?>"><?php  echo _AT('all_students'); ?></option>
29                                         <optgroup label="<?php  echo _AT('specific_groups'); ?>">
30                                                 <?php
31                                                         
32                                                         while ($type_row = mysql_fetch_assoc($result_assign)) {
33                                                                 echo '<option value="'.$type_row['type_id'].'" ';
34                                                                 if ($this->assign_to == $type_row['type_id']) {
35                                                                         echo 'selected="selected"';
36                                                                 }
37                                                                 echo '>'.$type_row['title'].'</option>';
38                                                         }
39                                                 ?>
40                                         </optgroup>
41                                 </select>
42                         <?php } ?>
43         </div>  
44
45         <div class="row">
46                 <?php  echo _AT('due_date'); ?><br />
47                 <input type="radio" name="has_due_date" value="false" id="noduedate" <?php if ($this->has_due_date == 'false') { echo 'checked="checked"'; } ?> 
48                 onfocus="disable_dates (true, '_due');" />
49                 <label for="noduedate" title="<?php echo _AT('due_date'). ': '. _AT('none');  ?>"><?php echo _AT('none'); ?></label><br />
50
51                 <input type="radio" name="has_due_date" value="true" id="hasduedate" <?php if ($this->has_due_date == 'true'){echo 'checked="checked"'; } ?> 
52                 onfocus="disable_dates (false, '_due');" />
53                 <label for="hasduedate"  title="<?php echo _AT('due_date') ?>"><?php  echo _AT('date'); ?></label>
54
55                 <?php
56                         $today_day  = $dueday;
57                         $today_mon  = $duemonth;
58                         $today_year = $dueyear;
59                         $today_hour = $duehour;
60                         $today_min  = $dueminute;
61                         
62                         $name = '_due';
63                         require(AT_INCLUDE_PATH.'html/release_date.inc.php');
64                 ?>
65         </div>
66
67         <div class="row">
68                 <?php  echo _AT('accept_late_submissions'); ?><br />
69                 <input type="radio" name="late_submit" value="0" id="always"  <?php if ($this->late_submit == '0'){echo 'checked="checked"';} ?> 
70                 onfocus="disable_dates (true, '_cutoff');" />
71
72                 <label for="always" title="<?php echo _AT('accept_late_submissions'). ': '. _AT('always');  ?>"><?php echo _AT('always'); ?></label><br />
73
74                 <input type="radio" name="late_submit" value="1" id="never"  <?php if ($this->late_submit == '1'){echo 'checked="checked"';} ?>
75                 onfocus="disable_dates (true, '_cutoff');" />
76
77                 <label for="never" title="<?php echo _AT('accept_late_submissions'). ': '. _AT('never');  ?>"><?php  echo _AT('never'); ?></label><br />
78
79                 <input type="radio" name="late_submit" value="2" id="until"  <?php if ($this->late_submit == '2'){echo 'checked="checked"';} ?>
80                 onfocus="disable_dates (false, '_cutoff');" />
81
82                 <label for="until" title="<?php echo _AT('accept_late_submissions'). ': '. _AT('until');  ?>"><?php  echo _AT('until'); ?></label>
83
84                 <?php
85                         $today_day  = $cutoffday;
86                         $today_mon  = $cutoffmonth;
87                         $today_year = $cutoffyear;
88                         $today_hour = $cutoffhour;
89                         $today_min  = $cutoffminute;
90                         
91                         $name = '_cutoff';
92                         require(AT_INCLUDE_PATH.'html/release_date.inc.php');
93                 ?>
94         </div>
95         <?php
96         /****
97          * not included in the initial release.
98          *
99         <div class="row">
100                 <?php  echo _AT('options'); <br/>
101                 <input type="checkbox" name="multi_submit" id="multisubmit" <?php if ($multi_submit == '1'){ echo 'checked="checked"'; }  />
102                 <label for="multisubmit"><?php  echo _AT('allow_re_submissions'); </label>
103         </div>
104         ***/
105         ?>
106         
107         <div class="row buttons">
108                 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" class="button"/>
109                 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>"  class="button"/>
110         </div>
111         </fieldset>
112 </div>
113
114 </form>