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

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

first implementations for academic reports of secondary schools

call the URL: [path to level]/academic_report_view

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