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

Last change on this file since 3707 was 3707, checked in by Henrik Bettermann, 16 years ago
  • OIS customizations according to Issoufou's wish list of Oct 2 (2, 4, 5, 6, 7, 8)
File size: 13.2 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      Subject 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 subjects 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" width="100%">
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'>CA 1 <br />Marks</th>
92        <th align='center'>CA 2 <br />Marks</th>   
93        <th align='center'>Exam <br />Marks</th>             
94        <th align='center'>Overall <br />Marks</th>
95        <th align='center'>Grade</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" tal:content="row/ca1"></td>
113          <td align="center" tal:content="row/ca2"></td>
114          <td align="center" tal:content="row/exam"></td>
115          <td align="center" tal:content="row/score_calc"></td>
116          <td align="center" tal:content="row/grade"></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 
140         
141      <br />
142     
143      <table tal:condition="python: is_student and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
144             class="folderButtons">
145        <tr>
146          <td align="left" valign="top" rowspan="3"></td>
147          <td align="left" valign="top">
148              <input type="submit" name="delete_course_result:method" value="Delete selected"
149                     class="destructive" i18n:attributes="value"
150                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
151                     ('Do you really want to delete selected subjects?', )"
152                     />
153              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
154                     class="context" value="Update"
155                     />
156                   
157                     
158              <br /><br />
159              <input tal:condition="not: info/credits_exceeded"
160                     type="submit" name="register_courses:method"
161                     class="context" value="Submit to Academic Tutor"
162                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
163                     ('Do you really want to submit the list? You will not be able to edit your data after submission.', )" />
164              <span tal:condition="info/credits_exceeded">
165                  <font color="red"> <strong>Your total credits exceed <span tal:replace="info/max_credits" />!</strong></font>
166              </span>
167                     
168              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
169                     tal:attributes="value study_level_view"/> 
170                     
171              <br /><br />
172             
173              <span tal:condition="python: 1">
174              <strong>Note:</strong> 'Update' checks for all subjects in your certificate and will add them to your subject list irrespective of
175              prior deletion, i.e. already deleted subjectss will show up again.
176              Please use this function only if you are sure that your faculty has added subjects which are not yet on your subject list.                               
177              </span>
178              <span tal:condition="python: 0">
179              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
180              </span>             
181                     
182          </td>
183        </tr>
184      </table>
185      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
186             class="folderButtons">
187        <tr>
188          <td align="left" valign="top" rowspan="3"></td>
189          <td align="left" valign="top">
190              <input type="button" value="Select all" class="context"
191                     onclick="someJavaScriptFunctionThatWillBeReplaced"
192                     i18n:attributes="value"
193                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
194                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
195                     />
196              <input type="submit" name="delete_course_result:method" value="Delete selected"
197                     class="destructive" i18n:attributes="value"
198                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
199                     ('Do you really want to delete the subjects selected?', )"
200                     />
201              <input
202                     type="submit" name="refresh_level:method"
203                     class="context" value="Update"
204                     />
205              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
206                     class="context" value="Submit" /> 
207              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
208                     class="context" value="Validate" />
209              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
210                     class="context" value="Reject" />
211                     
212              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
213                     tal:attributes="value study_level_view"/>                         
214              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
215                     tal:attributes="value contact_student_form"/>                         
216
217          </td>
218        </tr>
219      </table>
220      <table tal:condition="python:is_ca and is_current_level and not has_verdict" width="100%" cellspacing="0" cellpadding="2"
221             class="folderButtons">
222        <tr>
223          <td align="left" valign="top" rowspan="3"></td>
224          <td align="left" valign="top">
225              <input tal:condition="show_check_boxes"
226                     type="button" value="Select all" class="context"
227                     onclick="someJavaScriptFunctionThatWillBeReplaced"
228                     i18n:attributes="value"
229                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
230                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
231                     />
232              <input tal:condition="show_check_boxes"
233                     type="submit" name="delete_course_result:method" value="Delete selected"
234                     class="destructive" i18n:attributes="value"
235                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
236                     ('Do you really want to delete the subjects selected?', )"
237                     />
238              <input tal:condition="show_check_boxes"
239                     type="submit" name="refresh_level:method"
240                     class="context" value="Update"
241                     />
242              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
243                     class="context" value="Submit" /> 
244              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
245                     class="context" value="Validate" />
246              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
247                     class="context" value="Reject" />
248                     
249              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
250                     tal:attributes="value study_level_view"/>                         
251              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
252                     tal:attributes="value contact_student_form"/>   
253                                           
254
255          </td>
256        </tr>
257      </table>
258
259    </form>
260    <br />
261      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
262          tal:condition="show_check_boxes">
263      <table>
264        <tr>
265          <th>Subject Id</th>
266          <td><input type="text" name="course_id"
267                     tal:attributes="value request/course_id|nothing"/></td>
268          <td colspan="2">
269            <input type="submit" name="add"
270                   class="context" value="Add Subject"
271                   />
272            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
273                     tal:attributes="value study_level_view"/>                       
274          </td>               
275      </table>
276      </form>   
277  </span>
278  </span>       
279  </metal:block>   
280  </metal:main>
281
282</metal:body>
283
Note: See TracBrowser for help on using the repository browser.