source: WAeUP_SRP/trunk/skins/waeup_futminna/study_level_view.pt @ 16595

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

Implement 100L carryover courses registration in current_level 100. The level id is 501. The course result records are not beeing marked as carryovers because students can add courses which are not marked as such.

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