source: WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt @ 3675

Last change on this file since 3675 was 3675, checked in by Henrik Bettermann, 16 years ago
  • Start customization of the course_results catalog and using different layouts for course result editing by lecturers and section officers. Dont't forget to add symbolic links in all product folders, for example:

cd /zope/instances/WAeUP_OIS/WAeUP_SRP/profiles/default/
ln -s ../../profiles_custom/default/course_results.xml .
cd layouts/
ln -s ../../../profiles_custom/default/layouts/student_course_result.xml .

File size: 13.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
25    <span tal:condition="python:False"> 
26    <div style="text-align: right"
27         tal:condition="rejection_allowed">
28    <a href="" target="slip" tal:attributes="href string:course_registration_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        Course Registration Slip
32    </a>
33    </div>
34   
35    <div style="text-align: right"
36         tal:condition="info/gpa">
37    <a href="" target="slip" tal:attributes="href string:new_session_results_slip"
38        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')">
39        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
40        Session Results Slip
41    </a>
42    </div>   
43    </span>
44
45
46         
47    <a href=""
48       tal:attributes="href string:${here/academicsParent}">
49      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
50      Up one level
51    </a>
52
53    <h3>
54      <span tal:condition="python: is_so or is_ca">
55        <span tal:content="info/student/name" />:
56      </span>
57      <span tal:condition="is_student">My </span>
58     
59      Course Registration Form for <span tal:content="info/level_str" />
60    </h3>
61   
62        <br />
63        <table>
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 courses 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">
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'></th>
92        <th align='center'>ca1</th>
93        <th align='center'>ca2</th>   
94        <th align='center'>em</th>             
95        <th align='center'>om</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           
102            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
103          <td align="left" valign="middle" style="width: 5%;"
104             tal:condition="show_check_boxes">
105            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
106                   tal:define="id row/id"
107                   tal:attributes="value id;
108                   id python:'cb_' + id;
109                   checked python:id in info['choosen_ids'];"
110                   />
111          </td>
112          <td tal:content="row/title"></td>
113          <td align="center" width="10%" tal:content="row/code"></td>
114          <td align="center" tal:content="row/ca1"></td>
115          <td align="center" tal:content="row/ca2"></td>
116          <td align="center" tal:content="row/exam"></td>
117          <td align="center" tal:content="row/score_calc"></td>
118         
119          <td tal:condition="python:submission_allowed and is_student" align="center">
120            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
121            target="edit_course_result"
122            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')">
123            [edit]
124            </a>
125          </td>       
126          <td tal:condition="is_so" align="center">
127            <a href="edit" tal:attributes="href string:lecturer_course_edit/${row/code}"
128            target="edit_course_result"
129            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')">
130            [edit]
131            </a>
132          </td>                   
133        </tr>
134        <tr><td>&nbsp;</td></tr>
135        </span>       
136       
137      </table>
138      </span>
139     
140      <table>
141      <tr><th>ca1/2:</th> <td>CA 1/2 Marks</td></tr>
142      <tr><th>em:</th> <td>Exam Marks</td></tr>
143      <tr><th>om:</th> <td>Overall Marks</td></tr>
144      </table>     
145         
146      <br />
147     
148      <table tal:condition="python: is_student and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
149             class="folderButtons">
150        <tr>
151          <td align="left" valign="top" rowspan="3"></td>
152          <td align="left" valign="top">
153              <input type="submit" name="delete_course_result:method" value="Delete selected"
154                     class="destructive" i18n:attributes="value"
155                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
156                     ('Do you really want to delete selected courses?', )"
157                     />
158              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
159                     class="context" value="Update"
160                     />
161                   
162                     
163              <br /><br />
164              <input tal:condition="not: info/credits_exceeded"
165                     type="submit" name="register_courses:method"
166                     class="context" value="Submit to Course Adviser"
167                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
168                     ('Do you really want to submit the course list? You will not be able to edit your data after submission.', )" />
169              <span tal:condition="info/credits_exceeded">
170                  <font color="red"> <strong>Your total credits exceed <span tal:replace="info/max_credits" />!</strong></font>
171              </span>
172                     
173              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
174                     tal:attributes="value study_level_view"/> 
175                     
176              <br /><br />
177             
178              <span tal:condition="python: 1">
179              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
180              prior deletion, i.e. already deleted courses will show up again.
181              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                               
182              </span>
183              <span tal:condition="python: 0">
184              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
185              </span>             
186                     
187          </td>
188        </tr>
189      </table>
190      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
191             class="folderButtons">
192        <tr>
193          <td align="left" valign="top" rowspan="3"></td>
194          <td align="left" valign="top">
195              <input type="button" value="Select all" class="context"
196                     onclick="someJavaScriptFunctionThatWillBeReplaced"
197                     i18n:attributes="value"
198                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
199                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
200                     />
201              <input type="submit" name="delete_course_result:method" value="Delete selected"
202                     class="destructive" i18n:attributes="value"
203                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
204                     ('Do you really want to delete the courses selected?', )"
205                     />
206              <input
207                     type="submit" name="refresh_level:method"
208                     class="context" value="Update"
209                     />
210              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
211                     class="context" value="Submit" /> 
212              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
213                     class="context" value="Validate" />
214              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
215                     class="context" value="Reject" />
216                     
217              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
218                     tal:attributes="value study_level_view"/>                         
219              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
220                     tal:attributes="value contact_student_form"/>                         
221
222          </td>
223        </tr>
224      </table>
225      <table tal:condition="python:is_ca and is_current_level and not has_verdict" width="100%" cellspacing="0" cellpadding="2"
226             class="folderButtons">
227        <tr>
228          <td align="left" valign="top" rowspan="3"></td>
229          <td align="left" valign="top">
230              <input tal:condition="show_check_boxes"
231                     type="button" value="Select all" class="context"
232                     onclick="someJavaScriptFunctionThatWillBeReplaced"
233                     i18n:attributes="value"
234                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
235                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
236                     />
237              <input tal:condition="show_check_boxes"
238                     type="submit" name="delete_course_result:method" value="Delete selected"
239                     class="destructive" i18n:attributes="value"
240                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
241                     ('Do you really want to delete the courses selected?', )"
242                     />
243              <input tal:condition="show_check_boxes"
244                     type="submit" name="refresh_level:method"
245                     class="context" value="Update"
246                     />
247              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
248                     class="context" value="Submit" /> 
249              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
250                     class="context" value="Validate" />
251              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
252                     class="context" value="Reject" />
253                     
254              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
255                     tal:attributes="value study_level_view"/>                         
256              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
257                     tal:attributes="value contact_student_form"/>   
258                                           
259
260          </td>
261        </tr>
262      </table>
263
264    </form>
265    <br />
266      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
267          tal:condition="show_check_boxes">
268      <table>
269        <tr>
270          <th>Course Id</th>
271          <td><input type="text" name="course_id"
272                     tal:attributes="value request/course_id|nothing"/></td>
273          <td colspan="2">
274            <input type="submit" name="add"
275                   class="context" value="Add Course"
276                   />
277            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
278                     tal:attributes="value study_level_view"/>                       
279          </td>               
280      </table>
281      </form>   
282  </span>
283  </span>       
284  </metal:block>   
285  </metal:main>
286
287</metal:body>
288
Note: See TracBrowser for help on using the repository browser.