source: WAeUP_SRP/base/skins/waeup_student/study_level_view.pt @ 3643

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

implement cgpa and cascore

  • Property svn:keywords set to Id
File size: 17.8 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    <div style="text-align: right"
24         tal:condition="rejection_allowed">
25    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
26        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')">
27        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
28        Course Registration Slip
29    </a>
30    </div>
31   
32    <div style="text-align: right"
33         tal:condition="info/gpa">
34    <a href="" target="slip" tal:attributes="href string:new_session_results_slip"
35        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')">
36        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
37        Session Results Slip
38    </a>
39    </div>   
40
41         
42    <a href=""
43       tal:attributes="href string:${here/academicsParent}">
44      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
45      Up one level
46    </a>
47
48    <h3>
49      <span tal:condition="python: is_so or is_ca">
50        <span tal:content="info/student/name" />:
51      </span>
52      <span tal:condition="is_student">My </span>
53     
54      Course Registration Form for <span tal:content="info/level_str" />
55    </h3>
56   
57        <br />
58        <table>
59          <tr>
60            <th  width="220px">Session:</th>
61            <td><span tal:content="info/session" /></td>
62          </tr>
63          <tr>
64            <th>Total Credits:</th>
65            <td tal:content="info/total_credits" />
66          </tr>
67          <tr tal:condition="has_verdict">
68            <th>Verdict:</th>
69            <td><span tal:content="info/verdict" /></td>
70          </tr>     
71          <tr tal:condition="info/gpa">
72            <th>GPA:</th>
73            <td><span tal:content="info/gpa" /></td>
74          </tr>
75        </table>           
76   
77             
78    <form action="." method="post" class="group" onsubmit="return submit_once()">
79      <span tal:condition="info/carry_overs" tal:omit-tag="">
80      <h3>Carryover Courses</h3>
81      <br />
82      <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
83
84        <tr>
85        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')">Both Semesters</th>
86        <th align='center'></th>
87        <th align='center'>sm</th>
88        <th align='center'>cr</th>
89        <th tal:condition="with_score" align='center'>sc</th>
90        <th tal:condition="with_cascore" align='center'>ca</th>
91        <th align='center'>gr</th>
92        <th align='center'>wt</th>
93        <th align='center'></th>
94        <th tal:condition="submission_allowed" align='center'></th>   
95           
96        </tr>         
97        <tr tal:repeat="row info/carry_overs"
98            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
99     
100          <td align="left" valign="middle" style="width: 5%;"
101              tal:condition="show_check_boxes">
102            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
103                   tal:define="id row/id"
104                   tal:attributes="value id;
105                   id python:'cb_' + id;
106                   checked python:id in info['choosen_ids'];"
107                   />
108          </td>
109
110          <td width="58%" tal:content="row/title"></td>
111          <td align="center" width="10%" tal:content="row/code"></td>
112          <td align="center" width="2%"><span tal:content="row/semester" /></td>
113          <td align="center" width="2%" tal:content="row/credits"></td>
114          <td tal:condition="with_score" align="center" width="4%" tal:content="row/score"></td>
115          <td tal:condition="with_cascore" align="center" width="4%" tal:content="row/cascore"></td>
116          <td align="center" width="2%" tal:content="row/grade"></td>
117          <td align="center" width="2%" tal:content="row/weight"></td>
118          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
119         
120          <td tal:condition="submission_allowed" align="center" width="5%">&nbsp;</td>
121       
122        </tr>
123      </table>
124      </span>
125
126      <div class="" tal:condition="python: info['data_missing'] and not info['spillover']">
127        <font color="red">Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!</font>
128        <br /><br />
129      </div>
130       
131      <span tal:condition="not:info/data_missing" tal:omit-tag="">
132      <h3>Session Courses</h3>
133      <br />
134
135      <table class="contentListing" width="100%" id="folder_content">
136       
137        <span tal:repeat="sem python:('1','2')">       
138                   
139        <tr>
140        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')"
141            tal:content="python: test(sem == '1','First Semester', 'Second Semester')" />
142        <th align='center'></th>
143        <th align='center'>sm</th>
144        <th align='center'>cr</th>
145        <th tal:condition="with_score" align='center'>sc</th>
146        <th tal:condition="with_cascore" align='center'>ca</th>
147        <th align='center'>gr</th>
148        <th align='center'>wt</th>
149        <th align='center'></th>
150        <th tal:condition="submission_allowed" align='center'></th>   
151           
152        </tr>               
153        <tr tal:repeat="row python: test(sem == '1',info['normal1'],info['normal2'])"
154            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
155          <td align="left" valign="middle" style="width: 5%         ;"
156             tal:condition="show_check_boxes">
157            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
158                   tal:define="id row/id"
159                   tal:attributes="value id;
160                   id python:'cb_' + id;
161                   checked python:id in info['choosen_ids'];"
162                   />
163          </td>
164          <td width="58%" tal:content="row/title"></td>
165          <td align="center" width="10%" tal:content="row/code"></td>
166          <td align="center" width="2%"><span tal:content="row/semester" /></td>
167          <td align="center" width="2%" tal:content="row/credits"></td>
168          <td tal:condition="with_score" align="center" width="4%" tal:content="row/score"></td>
169          <td tal:condition="with_cascore" align="center" width="4%" tal:content="row/cascore"></td>
170          <td align="center" width="2%" tal:content="row/grade"></td>
171          <td align="center" width="2%" tal:content="row/weight"></td>
172          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
173         
174          <td tal:condition="submission_allowed" width="5%" align="center">
175            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
176            target="edit_course_result"
177            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')">
178            [edit]
179            </a>
180          </td>         
181        </tr>
182
183        </span>       
184       
185        <tr><th colspan="3" tal:condition="info/normal3"> Combined</th></tr>               
186        <tr tal:condition="info/normal3" tal:repeat="row info/normal3"
187            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
188          <td align="left" valign="middle" style="width: 5%;"
189             tal:condition="show_check_boxes">
190            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
191                   tal:define="id row/id"
192                   tal:attributes="value id;
193                   id python:'cb_' + id;
194                   checked python:id in info['choosen_ids'];"
195                   />
196          </td>
197          <td width="58%" tal:content="row/title"></td>
198          <td align="center" width="10%" tal:content="row/code"></td>
199          <td align="center" width="2%"><span tal:content="row/semester" /></td>
200          <td align="center" width="2%" tal:content="row/credits"></td>
201          <td tal:condition="with_score" align="center" width="4%" tal:content="row/score"></td>
202          <td tal:condition="with_cascore" align="center" width="4%" tal:content="row/cascore"></td>
203          <td align="center" width="2%" tal:content="row/grade"></td>
204          <td align="center" width="2%" tal:content="row/weight"></td>
205          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
206         
207          <td tal:condition="submission_allowed" width="5%" align="center">
208          <a href="edit" tal:attributes="href string:course_edit/${row/code}"
209          target="edit_course_result"
210          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')">
211          [edit]
212          </a>
213          </td>         
214        </tr>       
215       
216      </table>
217      </span>
218     
219      <br />
220      <table>
221      <tr><th>sm:</th> <td>Semester</td></tr>
222      <tr><th>cr:</th> <td>Credits</td></tr>
223      <tr tal:condition="with_score"><th>sc:</th> <td>Score</td></tr>
224      <tr tal:condition="with_cascore"><th>ca:</th> <td>CA Score</td></tr>
225      <tr><th>gr: </th> <td>Grade</td></tr>
226      <tr><th>wt: </th> <td>Weight</td></tr>
227      </table>     
228         
229      <br />
230     
231      <table tal:condition="python: is_student and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
232             class="folderButtons">
233        <tr>
234          <td align="left" valign="top" rowspan="3"></td>
235          <td align="left" valign="top">
236              <input type="submit" name="delete_course_result:method" value="Delete selected"
237                     class="destructive" i18n:attributes="value"
238                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
239                     ('Do you really want to delete selected courses?', )"
240                     />
241              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
242                     class="context" value="Update"
243                     />
244                   
245                     
246              <br /><br />
247              <input tal:condition="not: info/credits_exceeded"
248                     type="submit" name="register_courses:method"
249                     class="context" value="Submit to Course Adviser"
250                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
251                     ('Do you really want to submit the course list? You will not be able to edit your data after submission.', )" />
252              <span tal:condition="info/credits_exceeded">
253                  <font color="red"> <strong>Your total credits exceed <span tal:replace="info/max_credits" />!</strong></font>
254              </span>
255                     
256              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
257                     tal:attributes="value study_level_view"/> 
258                     
259              <br /><br />
260             
261              <span tal:condition="python: 1">
262              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
263              prior deletion, i.e. already deleted courses will show up again.
264              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                               
265              </span>
266              <span tal:condition="python: 0">
267              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
268              </span>             
269                     
270          </td>
271        </tr>
272      </table>
273      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
274             class="folderButtons">
275        <tr>
276          <td align="left" valign="top" rowspan="3"></td>
277          <td align="left" valign="top">
278              <input type="button" value="Select all" class="context"
279                     onclick="someJavaScriptFunctionThatWillBeReplaced"
280                     i18n:attributes="value"
281                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
282                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
283                     />
284              <input type="submit" name="delete_course_result:method" value="Delete selected"
285                     class="destructive" i18n:attributes="value"
286                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
287                     ('Do you really want to delete the courses selected?', )"
288                     />
289              <input
290                     type="submit" name="refresh_level:method"
291                     class="context" value="Update"
292                     />
293              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
294                     class="context" value="Submit" /> 
295              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
296                     class="context" value="Validate" />
297              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
298                     class="context" value="Reject" />
299                     
300              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
301                     tal:attributes="value study_level_view"/>                         
302              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
303                     tal:attributes="value contact_student_form"/>                         
304
305          </td>
306        </tr>
307      </table>
308      <table tal:condition="python:is_ca and is_current_level and not has_verdict" width="100%" cellspacing="0" cellpadding="2"
309             class="folderButtons">
310        <tr>
311          <td align="left" valign="top" rowspan="3"></td>
312          <td align="left" valign="top">
313              <input tal:condition="show_check_boxes"
314                     type="button" value="Select all" class="context"
315                     onclick="someJavaScriptFunctionThatWillBeReplaced"
316                     i18n:attributes="value"
317                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
318                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
319                     />
320              <input tal:condition="show_check_boxes"
321                     type="submit" name="delete_course_result:method" value="Delete selected"
322                     class="destructive" i18n:attributes="value"
323                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
324                     ('Do you really want to delete the courses selected?', )"
325                     />
326              <input tal:condition="show_check_boxes"
327                     type="submit" name="refresh_level:method"
328                     class="context" value="Update"
329                     />
330              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
331                     class="context" value="Submit" /> 
332              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
333                     class="context" value="Validate" />
334              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
335                     class="context" value="Reject" />
336                     
337              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
338                     tal:attributes="value study_level_view"/>                         
339              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
340                     tal:attributes="value contact_student_form"/>   
341                                           
342
343          </td>
344        </tr>
345      </table>
346
347    </form>
348    <br />
349      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
350          tal:condition="show_check_boxes">
351      <table>
352        <tr>
353          <th>Course Id</th>
354          <td><input type="text" name="course_id"
355                     tal:attributes="value request/course_id|nothing"/></td>
356          <td colspan="2">
357            <input type="submit" name="add"
358                   class="context" value="Add Course"
359                   />
360            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
361                     tal:attributes="value study_level_view"/>                       
362          </td>               
363      </table>
364      </form>   
365  </span>
366  </span>       
367  </metal:block>   
368  </metal:main>
369
370</metal:body>
371
Note: See TracBrowser for help on using the repository browser.