source: WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt @ 17628

Last change on this file since 17628 was 8179, checked in by Henrik Bettermann, 13 years ago

Show always link to course registration slip.

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