Changeset 2760
- Timestamp:
- 26 Nov 2007, 07:39:15 (17 years ago)
- Location:
- WAeUP_SRP/base/skins/waeup_student
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/course_registration_slip.pt
r2757 r2760 12 12 show_check_boxes info/show_check_boxes; 13 13 is_student info/is_student; 14 status_info info/status_info; 15 review_state info/review_state; 16 validated python:review_state in ('courses_validated',); 17 view_only info/view_only" 18 > 14 validated info/validated; 15 "> 19 16 <h3>Course Registration Slip for <span tal:content="here/title_or_id" /></h3> 20 17 <br /> -
WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py
r2758 r2760 42 42 student_id = context.getStudentId() 43 43 level_id = context.getId() 44 level_doc = info['doc'] = context.getContent() 44 45 45 46 info['is_so'] = is_so = context.isSectionOfficer() … … 48 49 info['student'] = student = context.students_catalog(id=student_id)[0] 49 50 info['review_state'] = review_state = student.review_state 50 info['view_only'] = review_state != "school_fee_paid" 51 is_current_level = level_id == student.level 52 school_fee_paid = review_state == 'school_fee_paid' 53 info['is_current_level'] = is_current_level 54 info['has_verdict'] = has_verdict = level_doc.verdict 51 55 52 level_doc = info['doc'] = context.getContent() 56 info['submission_allowed']= school_fee_paid and is_current_level and not has_verdict 57 info['validation_allowed']= review_state == 'courses_registered' and is_current_level 58 info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) and is_current_level 59 info['validated'] = review_state == 'courses_validated' and is_current_level 53 60 54 school_fee_paid = review_state == 'school_fee_paid' 55 is_current_level = level_id == student.level 61 info['show_check_boxes'] = (is_ca and school_fee_paid and is_current_level and not has_verdict) or\ 62 (is_student and school_fee_paid and is_current_level and not has_verdict) or\ 63 (is_so and is_current_level and not has_verdict) 56 64 57 58 59 info['show_check_boxes'] = (is_ca and school_fee_paid and is_current_level and not level_doc.verdict) or\ 60 (is_student and school_fee_paid and is_current_level and not level_doc.verdict) or\ 61 (is_so and is_current_level and not level_doc.verdict) 62 63 info['is_current_level'] = is_current_level 65 info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict).upper() 66 info['session'] = context.portal_vocabularies.sessions.get(level_doc.session) 67 info['level_str'] = context.portal_vocabularies.levels.get(level_id) 64 68 65 69 info['choosen_ids'] = request.get('ids',[]) 66 info['status_info'] = "" 67 if is_student: 68 if review_state == 'courses_registered': 69 info['status_info'] = "Request for course validation pending" 70 elif review_state == 'courses_validated': 71 info['status_info'] = "Courses validated" 72 elif is_ca: 73 if review_state == 'courses_registered': 74 info['status_info'] = "Please validate these courses" 75 elif review_state == 'courses_validated': 76 info['status_info'] = "Courses validated" 70 71 #info['status_info'] = "" 72 #if is_student: 73 # if review_state == 'courses_registered': 74 # info['status_info'] = "Request for course validation pending" 75 # elif review_state == 'courses_validated': 76 # info['status_info'] = "Courses validated" 77 #elif is_ca: 78 # if review_state == 'courses_registered': 79 # info['status_info'] = "Please validate these courses" 80 # elif review_state == 'courses_validated': 81 # info['status_info'] = "Courses validated" 77 82 78 83 cert_id = student.course … … 94 99 info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits)) 95 100 96 info['submission_allowed']= school_fee_paid and level_id == student.level and not level_doc.verdict97 info['validation_allowed']= review_state == 'courses_registered' and is_current_level98 info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) and is_current_level99 100 info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict).upper()101 info['session'] = context.portal_vocabularies.sessions.get(level_doc.session)102 info['level_str'] = context.portal_vocabularies.levels.get(level_id)103 101 104 102 -
WAeUP_SRP/base/skins/waeup_student/study_level_view.pt
r2758 r2760 11 11 is_ca info/is_ca; 12 12 show_check_boxes info/show_check_boxes; 13 has_verdict info/has_verdict; 14 submission_allowed info/submission_allowed; 15 rejection_allowed info/rejection_allowed; 13 16 is_current_level info/is_current_level; 14 17 is_student info/is_student; 15 status_info info/status_info; 16 review_state info/review_state; 17 view_only info/view_only"> 18 "> 18 19 <div style="text-align: right" 19 tal:condition=" python:review_state in ('courses_registered','courses_validated',) and is_current_level">20 tal:condition="rejection_allowed"> 20 21 <a href="" target="slip" tal:attributes="href string:course_registration_slip" 21 22 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 27 27 28 <div style="text-align: right" 28 tal:condition=" info/verdict">29 tal:condition="has_verdict"> 29 30 <a href="" target="slip" tal:attributes="href string:new_session_results_slip" 30 31 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')"> … … 60 61 <td tal:content="info/total_credits" /> 61 62 </tr> 62 <tr >63 <tr tal:condition="has_verdict"> 63 64 <th>Verdict:</th> 64 65 <td><span tal:content="info/verdict" /></td> 65 66 </tr> 66 <tr >67 <tr tal:condition="has_verdict"> 67 68 <th>GPA:</th> 68 69 <td><span tal:content="info/gpa" /></td> … … 98 99 <td align="center" width="10%" tal:content="row/coe|nothing"></td> 99 100 100 <td tal:condition=" python:info['submission_allowed']" align="center" width="5%"> </td>101 <td tal:condition="submission_allowed" align="center" width="5%"> </td> 101 102 102 103 </tr> … … 150 151 <td align="center" width="10%" tal:content="row/coe|nothing"></td> 151 152 152 <td tal:condition=" python:info['submission_allowed']" width="5%" align="center">153 <td tal:condition="submission_allowed" width="5%" align="center"> 153 154 <a href="edit" tal:attributes="href string:course_edit/${row/code}" 154 155 target="edit" … … 182 183 <td align="center" width="10%" tal:content="row/coe|nothing"></td> 183 184 184 <td tal:condition=" python:info['submission_allowed']" width="5%" align="center">185 <td tal:condition="submission_allowed" width="5%" align="center"> 185 186 <a href="edit" tal:attributes="href string:course_edit/${row/code}" 186 187 target="edit" … … 205 206 <br /> 206 207 207 <table tal:condition="python: is_student and info['submission_allowed']and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"208 <table tal:condition="python: is_student and submission_allowed and show_check_boxes" width="100%" cellspacing="0" cellpadding="2" 208 209 class="folderButtons"> 209 210 <tr> … … 267 268 class="context" value="Update" 268 269 /> 269 <input tal:condition=" info/submission_allowed" type="submit" name="register_courses:method"270 <input tal:condition="submission_allowed" type="submit" name="register_courses:method" 270 271 class="context" value="Submit" /> 271 272 <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method" … … 287 288 <td align="left" valign="top" rowspan="3"></td> 288 289 <td align="left" valign="top"> 289 <input tal:condition=" python: info['submission_allowed']"290 <input tal:condition="submission_allowed" 290 291 type="button" value="Select all" class="context" 291 292 onclick="someJavaScriptFunctionThatWillBeReplaced" … … 294 295 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" 295 296 /> 296 <input tal:condition=" python: info['submission_allowed']"297 <input tal:condition="submission_allowed" 297 298 type="submit" name="delete_course_result:method" value="Delete selected" 298 299 class="destructive" i18n:attributes="value" … … 300 301 ('Do you really want to delete the courses selected?', )" 301 302 /> 302 <input tal:condition=" python: info['submission_allowed']"303 <input tal:condition="submission_allowed" 303 304 type="submit" name="refresh_level:method" 304 305 class="context" value="Update" 305 306 /> 306 <input tal:condition=" info/submission_allowed" type="submit" name="register_courses:method"307 <input tal:condition="submission_allowed" type="submit" name="register_courses:method" 307 308 class="context" value="Submit" /> 308 309 <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
Note: See TracChangeset for help on using the changeset viewer.