source: WAeUP_SRP/trunk/skins/waeup_ois/academic_report_view.pt @ 3772

Last change on this file since 3772 was 3727, checked in by Henrik Bettermann, 16 years ago
  • more customizations for OIS
  • fetch all student object titles from getStudentObjectTitles.py
File size: 13.3 KB
Line 
1<metal:body use-macro="here/main_template/macros/master">
2  <metal:main fill-slot="main"
3          tal:define="info context/getStudyLevelInfo;
4                      contact_student_form string:contact_student_form;
5                      study_level_view string:study_level_view;">
6  <metal:block define-macro="edit_form">   
7             
8    <span tal:condition="not: info">
9      <span tal:content="here/illegal_view" />
10    </span>
11    <span tal:condition="info">
12    <span tal:define= "is_so context/isSectionOfficer;
13    is_ca info/is_ca;
14    show_check_boxes info/show_check_boxes;
15    has_verdict info/has_verdict;
16    submission_allowed info/submission_allowed;
17    rejection_allowed info/rejection_allowed;
18    is_current_level info/is_current_level;
19    is_student info/is_student;
20    with_score not: info/without_score|nothing;
21    with_cascore not: info/without_cascore|nothing;
22    ">     
23   
24
25    <span tal:condition="python:True"> 
26    <div style="text-align: right"
27         tal:condition="python:True">
28    <a href="" target="slip" tal:attributes="href string:academic_report_slip"
29        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
30        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
31        Academic Report Slip
32    </a>
33    </div>
34    </span>
35         
36    <a href=""
37       tal:attributes="href string:${here/academicsParent}">
38      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
39      Up one level
40    </a>
41
42    <h3>
43      <span tal:condition="python: is_so or is_ca">
44        <span tal:content="info/student/name" />:
45      </span>
46      Subject Registration Form for <span tal:content="info/level_str" />
47    </h3>
48       
49    <br />
50           
51    <table>
52      <tr>
53        <th>Session:</th>
54        <td><span tal:content="info/session" /></td>
55      </tr>
56      <tr tal:condition="has_verdict">
57        <th>Verdict:</th>
58        <td><span tal:content="info/verdict" /></td>
59      </tr>     
60    </table>           
61   
62             
63    <form action="." method="post" class="group" onsubmit="return submit_once()">
64
65      <div class="" tal:condition="python: info['data_missing'] and not info['spillover']">
66        <font color="red">Your faculty has not yet provided the list of subjects for your certificate. Please contact your faculty!</font>
67        <br /><br />
68      </div>
69       
70      <span tal:condition="not:info/data_missing" tal:omit-tag="">
71
72      <table class="contentListing"  id="folder_content" width="100%">
73       
74        <span tal:repeat="sem python:(('1','Term One','normal1'),('2','Term Two','normal2'),('3','Term Three','normal3'))">       
75                   
76        <tr tal:condition="python:info[sem[2]]">
77        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')"
78            tal:content="python:sem[1]" />
79        <th align='center'>ATL</th>   
80        <th align='center'>CA 1 <br />Marks</th>
81        <th align='center'>CA 2 <br />Marks</th>   
82        <th align='center'>Exam <br />Marks</th>             
83        <th align='center'>Overall <br />Marks</th>
84        <th align='center'>Grade</th>
85        <th tal:condition="submission_allowed" align='center'></th>   
86        <th tal:condition="is_so" align='center'></th>
87           
88        </tr>               
89        <tr tal:repeat="row python:info[sem[2]]"
90            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
91          <td align="left" valign="middle" style="width: 5%;"
92             tal:condition="show_check_boxes">
93            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
94                   tal:define="id row/id"
95                   tal:attributes="value id;
96                   id python:'cb_' + id;
97                   checked python:id in info['choosen_ids'];"
98                   />
99          </td>
100          <td tal:content="row/title"></td>
101          <td align="center" tal:content="python:context.portal_vocabularies.pastoral_grade.get(row['atl'])"></td>
102          <td align="center" tal:content="row/ca1"></td>
103          <td align="center" tal:content="row/ca2"></td>
104          <td align="center" tal:content="row/exam"></td>
105          <td align="center" tal:content="row/score_calc"></td>
106          <td align="center" tal:content="row/grade"></td>
107         
108          <td tal:condition="python:submission_allowed and is_student and False" align="center">
109            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
110            target="edit_course_result"
111            onclick="javascript:window.open('','edit_course_result','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
112            [edit]
113            </a>
114          </td>       
115          <td tal:condition="is_so" align="center">
116            <a href="edit" tal:attributes="href string:lecturer_course_edit/${row/code}"
117            target="edit_course_result"
118            onclick="javascript:window.open('','edit_course_result','width=600, height=500, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
119            [edit]
120            </a>
121          </td>                   
122        </tr>
123        <tr><td>&nbsp;</td></tr>
124        </span>       
125       
126      </table>
127      </span>
128     
129 
130         
131      <br />
132     
133      <table tal:condition="python: is_student and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
134             class="folderButtons">
135        <tr>
136          <td align="left" valign="top" rowspan="3"></td>
137          <td align="left" valign="top">
138              <input type="submit" name="delete_course_result:method" value="Delete selected"
139                     class="destructive" i18n:attributes="value"
140                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
141                     ('Do you really want to delete selected subjects?', )"
142                     />
143              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
144                     class="context" value="Update"
145                     />
146                   
147                     
148              <br /><br />
149              <input tal:condition="not: info/credits_exceeded"
150                     type="submit" name="register_courses:method"
151                     class="context" value="Submit to Academic Tutor"
152                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
153                     ('Do you really want to submit the list? You will not be able to edit your data after submission.', )" />
154              <span tal:condition="info/credits_exceeded">
155                  <font color="red"> <strong>Your total credits exceed <span tal:replace="info/max_credits" />!</strong></font>
156              </span>
157                     
158              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
159                     tal:attributes="value study_level_view"/> 
160                     
161              <br /><br />
162             
163              <span tal:condition="python: 1">
164              <strong>Note:</strong> 'Update' checks for all subjects in your certificate and will add them to your subject list irrespective of
165              prior deletion, i.e. already deleted subjectss will show up again.
166              Please use this function only if you are sure that your department has added subjects which are not yet on your subject list.                               
167              </span>
168              <span tal:condition="python: 0">
169              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
170              </span>             
171                     
172          </td>
173        </tr>
174      </table>
175      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
176             class="folderButtons">
177        <tr>
178          <td align="left" valign="top" rowspan="3"></td>
179          <td align="left" valign="top">
180              <input type="button" value="Select all" class="context"
181                     onclick="someJavaScriptFunctionThatWillBeReplaced"
182                     i18n:attributes="value"
183                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
184                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
185                     />
186              <input type="submit" name="delete_course_result:method" value="Delete selected"
187                     class="destructive" i18n:attributes="value"
188                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
189                     ('Do you really want to delete the subjects selected?', )"
190                     />
191              <input
192                     type="submit" name="refresh_level:method"
193                     class="context" value="Update"
194                     />
195              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
196                     class="context" value="Submit" /> 
197              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
198                     class="context" value="Validate" />
199              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
200                     class="context" value="Reject" />
201                     
202              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
203                     tal:attributes="value study_level_view"/>                         
204              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
205                     tal:attributes="value contact_student_form"/>                         
206
207          </td>
208        </tr>
209      </table>
210      <table tal:condition="python:is_ca and is_current_level and not has_verdict" width="100%" cellspacing="0" cellpadding="2"
211             class="folderButtons">
212        <tr>
213          <td align="left" valign="top" rowspan="3"></td>
214          <td align="left" valign="top">
215              <input tal:condition="show_check_boxes"
216                     type="button" value="Select all" class="context"
217                     onclick="someJavaScriptFunctionThatWillBeReplaced"
218                     i18n:attributes="value"
219                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
220                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
221                     />
222              <input tal:condition="show_check_boxes"
223                     type="submit" name="delete_course_result:method" value="Delete selected"
224                     class="destructive" i18n:attributes="value"
225                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
226                     ('Do you really want to delete the subjects selected?', )"
227                     />
228              <input tal:condition="show_check_boxes"
229                     type="submit" name="refresh_level:method"
230                     class="context" value="Update"
231                     />
232              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
233                     class="context" value="Submit" /> 
234              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
235                     class="context" value="Validate" />
236              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
237                     class="context" value="Reject" />
238                     
239              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
240                     tal:attributes="value study_level_view"/>                         
241              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
242                     tal:attributes="value contact_student_form"/>   
243                                           
244
245          </td>
246        </tr>
247      </table>
248
249    </form>
250    <br />
251      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
252          tal:condition="show_check_boxes">
253      <table>
254        <tr>
255          <th>Subject Id</th>
256          <td><input type="text" name="course_id"
257                     tal:attributes="value request/course_id|nothing"/></td>
258          <td colspan="2">
259            <input type="submit" name="add"
260                   class="context" value="Add Subject"
261                   />
262            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
263                     tal:attributes="value study_level_view"/>                       
264          </td>               
265      </table>
266      </form>   
267     
268      <table>     
269           <tr>
270            <th valign='top'>Pastoral Reports:</th>
271            <td>
272              <span tal:repeat="item python:info['items']">
273                <a href="view"
274                   tal:attributes="href item/id"
275                   tal:content="item/title"/><br />
276              </span>
277            </td>
278          </tr>
279       </table>     
280  </span>
281  </span>       
282  </metal:block>   
283  </metal:main>
284
285</metal:body>
286
Note: See TracBrowser for help on using the repository browser.