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

Last change on this file since 3292 was 3169, checked in by Henrik Bettermann, 17 years ago

srp_view.pt: Notice for course advisers added

action_after_* in external_study_level_view.pt and study_level_view.pt fixed

change_bed.py: psm modified and fixed for calls without parameter

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