Changeset 1515 for WAeUP_SRP/trunk/skins
- Timestamp:
- 3 Mar 2007, 11:45:58 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 1 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/getCPSCandidateLocalRoles.py
r1028 r1515 24 24 25 25 if member.id in ("admin","perry"): 26 return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer' ]27 return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer' ]26 return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer', 'CourseAdviser'] 27 return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer', 'CourseAdviser'] -
WAeUP_SRP/trunk/skins/waeup_default/isCourseAdviser.py
r1513 r1515 16 16 mtool = context.portal_membership 17 17 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 18 return context.isSectionOfficer or "ClearanceOfficer" in roles 18 return "CourseAdviser" in roles 19 -
WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py
r1513 r1515 52 52 student_id = context.getStudentId() 53 53 54 55 54 56 info = {} 55 info['is_student'] = is_student = context.isStudent() 56 info['is_ca'] = is_ca = context.isCourseAdviser() 57 info['is_so'] = is_so = context.isSectionOfficer() 58 info['is_student'] = is_student = context.isStudent() 59 info['is_ca'] = is_ca = context.isCourseAdviser() 57 60 info['student'] = student = context.students_catalog(id=student_id)[0] 58 61 info['review_state'] = review_state = context.getStudentReviewState() 59 info['view_only'] = review_state != "school_fee_paid" 60 info['show_check_boxes'] = (is_ca and review_state == 'courses_registered') or (is_student and context.getStudentReviewState() == "school_fee_paid") 62 info['view_only'] = review_state != "school_fee_paid" 63 info['show_check_boxes'] = (is_ca and review_state in ('courses_registered',)) or\ 64 (is_student and context.getStudentReviewState() == "school_fee_paid") or\ 65 (is_so) 61 66 info['choosen_ids'] = request.get('ids',[]) 62 67 info['status_info'] = "" 63 68 if is_student: 64 if review_state == 'courses_registered': 69 if review_state == 'courses_registered': 65 70 info['status_info'] = "Request for Course Validation pending" 66 elif review_state == 'courses_validated': 71 elif review_state == 'courses_validated': 67 72 info['status_info'] = "Courses validated" 68 73 elif is_ca: 69 if review_state == 'courses_registered': 74 if review_state == 'courses_registered': 70 75 info['status_info'] = "Please validate these Courses" 71 elif review_state == 'courses_validated': 76 elif review_state == 'courses_validated': 72 77 info['status_info'] = "Courses validated" 73 78 info['doc'] = context.getContent() -
WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt
r1513 r1515 26 26 27 27 <h3> 28 <span tal:condition=" is_so">28 <span tal:condition="python: is_so or is_ca"> 29 29 <span tal:content="info/student/name" />: 30 30 </span> 31 <span tal:content="here/title_or_id" /> 31 <span tal:condition="is_student">My </span> 32 33 Course Registration Form for <span tal:content="here/title_or_id" /> 32 34 </h3> 33 <br /> 35 34 36 </metal:block> 35 37 <metal:main fill-slot="main" tal:condition="python:1"> 36 <h3 tal:content="status_info"></h3>37 38 <form action="." method="post" class="group"> 38 39 <span tal:condition="info/carry_overs" tal:omit-tag=""> 39 <h 3>Carryover Courses</h3>40 <h4>Carryover Courses</h4> 40 41 <br /> 41 42 <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content"> … … 58 59 </tr> 59 60 </table> 60 </span> 61 <h3>Session Courses</h3> 61 </span> 62 <br /> 63 <h4>Session Courses</h4> 62 64 <br /> 63 65 <table class="contentListing" width="100%" summary="content layout" id="folder_content"> … … 65 67 tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> 66 68 <td align="left" valign="middle" style="width: 5px;" 67 tal:condition="show_check_boxes">69 tal:condition="show_check_boxes"> 68 70 <input type="checkbox" name="ids:list" value="" id="" class="noborder" 69 71 tal:define="id row/id" … … 80 82 </tr> 81 83 <tr> 82 <td colspan="1"></td>84 <td tal:condition="show_check_boxes" colspan="1"></td> 83 85 <td colspan="1"></td> 84 86 <th colspan="2">Total Credits:</th> … … 86 88 </tr> 87 89 </table> 88 <table tal:condition="not:view_only" width="100%" cellspacing="0" cellpadding="2" 90 91 92 93 94 <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2" 89 95 class="folderButtons"> 90 96 <tr> 91 97 <td align="left" valign="top" rowspan="3"></td> 92 98 <td align="left" valign="top"> 93 <span tal:condition="python:1"> 94 <input type="button" value="button_select_all" class="context" 95 onclick="someJavaScriptFunctionThatWillBeReplaced" 96 i18n:attributes="value" 97 tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' 98 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" 99 /> 100 <input type="submit" name="course_result_delete:method" value="Delete checked" 99 <input type="submit" name="course_result_delete:method" value="Delete Selected" 101 100 class="destructive" i18n:attributes="value" 102 101 tal:attributes="onclick python:'return window.confirm(\'%s\')' % 103 (' really delete checked courses', )"102 ('Do you really want to delete selected courses?', )" 104 103 /> 105 <input tal:condition="python:1" type="submit" name="register_courses:method" 106 class="context" value="Register" /> 107 <input tal:condition="is_ca" type="submit" name="notify_change_courses:method" 108 class="context" value="Reject Courses" /> 109 <input tal:condition="python: 1" 104 <input 110 105 type="submit" name="refresh_level:method" 111 class="context" value=" Refresh List"106 class="context" value="Check for Courses" 112 107 /> 113 </span> 108 <br /><br /> 109 <input type="submit" name="register_courses:method" 110 class="context" value="Submit Course List" /> 114 111 </td> 115 112 </tr> 116 113 </table> 117 <table tal:condition="python:is_ ca and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"114 <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2" 118 115 class="folderButtons"> 119 116 <tr> 120 117 <td align="left" valign="top" rowspan="3"></td> 121 118 <td align="left" valign="top"> 122 <span tal:condition="python:1"> 123 <input type="button" value="button_select_all" class="context" 119 <input type="button" value="Select All" class="context" 124 120 onclick="someJavaScriptFunctionThatWillBeReplaced" 125 121 i18n:attributes="value" … … 127 123 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" 128 124 /> 129 <input type="submit" name="course_result_delete:method" value="Delete checked"125 <input type="submit" name="course_result_delete:method" value="Delete Selected" 130 126 class="destructive" i18n:attributes="value" 131 127 tal:attributes="onclick python:'return window.confirm(\'%s\')' % 132 128 ('really delete checked courses', )" 133 129 /> 134 <input tal:condition="python:1" type="submit" name="validate_courses:method" 135 class="context" value="Validate" /> 136 <input tal:condition="is_ca" type="submit" name="notify_change_courses:method" 137 class="context" value="Reject Courses" /> 138 <input tal:condition="python: 1" 130 <input 139 131 type="submit" name="refresh_level:method" 140 class="context" value=" Refresh List"132 class="context" value="Check for Courses" 141 133 /> 142 </span> 134 <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method" 135 class="context" value="Submit Course List" /> 136 <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method" 137 class="context" value="Validate List" /> 138 <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method" 139 class="context" value="Reject Course List" /> 140 143 141 </td> 144 142 </tr> 145 143 </table> 144 <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2" 145 class="folderButtons"> 146 <tr> 147 <td align="left" valign="top" rowspan="3"></td> 148 <td align="left" valign="top"> 149 <input tal:condition="python: review_state == 'school_fee_paid'" 150 type="button" value="Select All" class="context" 151 onclick="someJavaScriptFunctionThatWillBeReplaced" 152 i18n:attributes="value" 153 tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' 154 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" 155 /> 156 <input tal:condition="python: review_state == 'school_fee_paid'" 157 type="submit" name="course_result_delete:method" value="Delete Selected" 158 class="destructive" i18n:attributes="value" 159 tal:attributes="onclick python:'return window.confirm(\'%s\')' % 160 ('really delete checked courses', )" 161 /> 162 <input tal:condition="python: review_state == 'school_fee_paid'" 163 type="submit" name="refresh_level:method" 164 class="context" value="Check for Courses" 165 /> 166 <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method" 167 class="context" value="Submit Course List" /> 168 <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method" 169 class="context" value="Validate List" /> 170 <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method" 171 class="context" value="Reject Course List" /> 172 173 </td> 174 </tr> 175 </table> 176 146 177 </form> 147 178 <br /> 148 <form action="add_course_result" method="post" class="group"179 <form action="add_course_result" method="post" class="group" 149 180 tal:condition="show_check_boxes"> 150 181 <table> … … 155 186 <td tal:condition="request/error|nothing" 156 187 tal:content="request/error" /> 157 </tr>158 <tr>159 <th></th>160 188 <td colspan="2"> 161 189 <input type="submit" name="add" 162 190 class="context" value="Add Course" 163 191 /> 164 </td> 165 </tr> 192 </td> 166 193 </table> 167 </form>194 </form> 168 195 </metal:main> 169 196 </metal:body>
Note: See TracChangeset for help on using the changeset viewer.