source: WAeUP_SRP/trunk/skins/waeup_student/academic_report_view.pt @ 3702

Last change on this file since 3702 was 3701, checked in by Henrik Bettermann, 16 years ago

add academic and pastoral report slips

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      <span tal:condition="is_student">My </span>
47     
48      Course Registration Form for <span tal:content="info/level_str" />
49    </h3>
50   
51        <br />
52           
53        <table>
54           <tr>
55            <th valign='top'>Pastoral Reports:</th>
56            <td>
57              <span tal:repeat="item python:info['items']">
58                <a href="view"
59                   tal:attributes="href item/id"
60                   tal:content="item/title"/><br />
61              </span>
62            </td>
63          </tr>
64          <tr>
65            <th>Session:</th>
66            <td><span tal:content="info/session" /></td>
67          </tr>
68          <tr tal:condition="has_verdict">
69            <th>Verdict:</th>
70            <td><span tal:content="info/verdict" /></td>
71          </tr>     
72        </table>           
73   
74             
75    <form action="." method="post" class="group" onsubmit="return submit_once()">
76
77      <div class="" tal:condition="python: info['data_missing'] and not info['spillover']">
78        <font color="red">Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!</font>
79        <br /><br />
80      </div>
81       
82      <span tal:condition="not:info/data_missing" tal:omit-tag="">
83
84      <table class="contentListing"  id="folder_content">
85       
86        <span tal:repeat="sem python:(('1','Term One','normal1'),('2','Term Two','normal2'),('3','Term Three','normal3'))">       
87                   
88        <tr tal:condition="python:info[sem[2]]">
89        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')"
90            tal:content="python:sem[1]" />
91        <th align='center'></th>
92        <th align='center'>ca1</th>
93        <th align='center'>ca2</th>   
94        <th align='center'>em</th>             
95        <th align='center'>om</th>
96        <th tal:condition="submission_allowed" align='center'></th>   
97        <th tal:condition="is_so" align='center'></th>
98           
99        </tr>               
100        <tr tal:repeat="row python:info[sem[2]]"
101            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
102          <td align="left" valign="middle" style="width: 5%;"
103             tal:condition="show_check_boxes">
104            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
105                   tal:define="id row/id"
106                   tal:attributes="value id;
107                   id python:'cb_' + id;
108                   checked python:id in info['choosen_ids'];"
109                   />
110          </td>
111          <td tal:content="row/title"></td>
112          <td align="center" width="10%" tal:content="row/code"></td>
113          <td align="center" tal:content="row/ca1"></td>
114          <td align="center" tal:content="row/ca2"></td>
115          <td align="center" tal:content="row/exam"></td>
116          <td align="center" tal:content="row/score_calc"></td>
117         
118          <td tal:condition="python:submission_allowed and is_student" align="center">
119            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
120            target="edit_course_result"
121            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')">
122            [edit]
123            </a>
124          </td>       
125          <td tal:condition="is_so" align="center">
126            <a href="edit" tal:attributes="href string:lecturer_course_edit/${row/code}"
127            target="edit_course_result"
128            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')">
129            [edit]
130            </a>
131          </td>                   
132        </tr>
133        <tr><td>&nbsp;</td></tr>
134        </span>       
135       
136      </table>
137      </span>
138     
139      <table>
140      <tr><th>ca1/2:</th> <td>CA 1/2 Marks</td></tr>
141      <tr><th>em:</th> <td>Exam Marks</td></tr>
142      <tr><th>om:</th> <td>Overall Marks</td></tr>
143      </table>     
144         
145      <br />
146     
147      <table tal:condition="python: is_student and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
148             class="folderButtons">
149        <tr>
150          <td align="left" valign="top" rowspan="3"></td>
151          <td align="left" valign="top">
152              <input type="submit" name="delete_course_result:method" value="Delete selected"
153                     class="destructive" i18n:attributes="value"
154                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
155                     ('Do you really want to delete selected courses?', )"
156                     />
157              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
158                     class="context" value="Update"
159                     />
160                   
161                     
162              <br /><br />
163              <input tal:condition="not: info/credits_exceeded"
164                     type="submit" name="register_courses:method"
165                     class="context" value="Submit to Course Adviser"
166                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
167                     ('Do you really want to submit the course list? You will not be able to edit your data after submission.', )" />
168              <span tal:condition="info/credits_exceeded">
169                  <font color="red"> <strong>Your total credits exceed <span tal:replace="info/max_credits" />!</strong></font>
170              </span>
171                     
172              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
173                     tal:attributes="value study_level_view"/> 
174                     
175              <br /><br />
176             
177              <span tal:condition="python: 1">
178              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
179              prior deletion, i.e. already deleted courses will show up again.
180              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                               
181              </span>
182              <span tal:condition="python: 0">
183              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
184              </span>             
185                     
186          </td>
187        </tr>
188      </table>
189      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
190             class="folderButtons">
191        <tr>
192          <td align="left" valign="top" rowspan="3"></td>
193          <td align="left" valign="top">
194              <input type="button" value="Select all" class="context"
195                     onclick="someJavaScriptFunctionThatWillBeReplaced"
196                     i18n:attributes="value"
197                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
198                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
199                     />
200              <input type="submit" name="delete_course_result:method" value="Delete selected"
201                     class="destructive" i18n:attributes="value"
202                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
203                     ('Do you really want to delete the courses selected?', )"
204                     />
205              <input
206                     type="submit" name="refresh_level:method"
207                     class="context" value="Update"
208                     />
209              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
210                     class="context" value="Submit" /> 
211              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
212                     class="context" value="Validate" />
213              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
214                     class="context" value="Reject" />
215                     
216              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
217                     tal:attributes="value study_level_view"/>                         
218              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
219                     tal:attributes="value contact_student_form"/>                         
220
221          </td>
222        </tr>
223      </table>
224      <table tal:condition="python:is_ca and is_current_level and not has_verdict" width="100%" cellspacing="0" cellpadding="2"
225             class="folderButtons">
226        <tr>
227          <td align="left" valign="top" rowspan="3"></td>
228          <td align="left" valign="top">
229              <input tal:condition="show_check_boxes"
230                     type="button" value="Select all" class="context"
231                     onclick="someJavaScriptFunctionThatWillBeReplaced"
232                     i18n:attributes="value"
233                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
234                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
235                     />
236              <input tal:condition="show_check_boxes"
237                     type="submit" name="delete_course_result:method" value="Delete selected"
238                     class="destructive" i18n:attributes="value"
239                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
240                     ('Do you really want to delete the courses selected?', )"
241                     />
242              <input tal:condition="show_check_boxes"
243                     type="submit" name="refresh_level:method"
244                     class="context" value="Update"
245                     />
246              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
247                     class="context" value="Submit" /> 
248              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
249                     class="context" value="Validate" />
250              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
251                     class="context" value="Reject" />
252                     
253              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
254                     tal:attributes="value study_level_view"/>                         
255              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
256                     tal:attributes="value contact_student_form"/>   
257                                           
258
259          </td>
260        </tr>
261      </table>
262
263    </form>
264    <br />
265      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
266          tal:condition="show_check_boxes">
267      <table>
268        <tr>
269          <th>Course Id</th>
270          <td><input type="text" name="course_id"
271                     tal:attributes="value request/course_id|nothing"/></td>
272          <td colspan="2">
273            <input type="submit" name="add"
274                   class="context" value="Add Course"
275                   />
276            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
277                     tal:attributes="value study_level_view"/>                       
278          </td>               
279      </table>
280      </form>   
281  </span>
282  </span>       
283  </metal:block>   
284  </metal:main>
285
286</metal:body>
287
Note: See TracBrowser for help on using the repository browser.