Changeset 1515
- Timestamp:
- 3 Mar 2007, 11:45:58 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py
r1471 r1515 74 74 real_object = real_object.im_self 75 75 if hasattr(real_object,'portal_type') and\ 76 real_object.portal_type not in ("Student","StudentClearance" ):76 real_object.portal_type not in ("Student","StudentClearance","StudentStudyLevel"): 77 77 break 78 78 sc = getattr(real_object,'study_course',None) … … 98 98 faculty = fac_id, 99 99 department = dep_id, 100 ) 101 102 100 ) 101 102 103 103 res = self.portal_catalog(portal_type="Department",id=dep_id) 104 104 if len(res) != 1: 105 break 105 break 106 106 dynamic_roles = self.getRolesInContext(res[0].getObject()) 107 107 for dr in ('ClearanceOfficer','CourseAdviser', 'SectionManager'): -
WAeUP_SRP/trunk/Students.py
r1448 r1515 23 23 MAX_TRANS = 1000 24 24 import DateTime 25 import PIL.Image25 # import PIL.Image 26 26 from StringIO import StringIO 27 27 -
WAeUP_SRP/trunk/exportimport.py
r1433 r1515 89 89 students.manage_setLocalGroupRoles(groupid = 'ClearanceOfficers', 90 90 roles=('SectionReader',)) 91 students.manage_setLocalGroupRoles(groupid = 'CourseAdvisers', 92 roles=('SectionReader',)) 91 93 students.manage_setLocalGroupRoles(groupid='MemberAdmins', 92 94 roles=('SectionOfficer',)) … … 111 113 if waeup_stacking_dir is not None: 112 114 waeup_stacking_dir.manage_setLocalGroupRoles(groupid='MemberAdmins', 113 roles=('SectionOfficer',)) 115 roles=('SectionOfficer',)) 114 116 115 117 ## pm.setLocalGroupRoles(campus.academics,['role:Authenticated', -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
r1482 r1515 12 12 <exit-transition transition_id="open"/> 13 13 <permission-map name="Add portal content" acquired="True"> 14 <permission-role>CourseAdviser</permission-role> 14 15 <permission-role>SectionOfficer</permission-role> 15 16 </permission-map> 16 17 <permission-map name="Delete objects" acquired="False"> 18 <permission-role>CourseAdviser</permission-role> 17 19 <permission-role>Manager</permission-role> 18 20 <permission-role>SectionManager</permission-role> … … 21 23 acquired="True"> 22 24 <permission-role>ClearanceOfficer</permission-role> 25 <permission-role>CourseAdviser</permission-role> 23 26 <permission-role>SectionOfficer</permission-role> 24 27 </permission-map> 25 28 <permission-map name="View" acquired="True"> 29 <permission-role>CourseAdviser</permission-role> 26 30 <permission-role>SectionOfficer</permission-role> 27 31 </permission-map> … … 32 36 <exit-transition transition_id="open"/> 33 37 <permission-map name="Add portal content" acquired="True"> 38 <permission-role>CourseAdviser</permission-role> 34 39 <permission-role>Owner</permission-role> 35 40 <permission-role>SectionOfficer</permission-role> 36 41 </permission-map> 37 42 <permission-map name="Delete objects" acquired="False"> 43 <permission-role>CourseAdviser</permission-role> 38 44 <permission-role>Manager</permission-role> 39 45 <permission-role>Owner</permission-role> … … 43 49 <permission-map name="Modify portal content" 44 50 acquired="True"> 51 <permission-role>CourseAdviser</permission-role> 45 52 <permission-role>SectionOfficer</permission-role> 46 53 </permission-map> 47 54 <permission-map name="View" acquired="True"> 55 <permission-role>CourseAdviser</permission-role> 48 56 <permission-role>SectionOfficer</permission-role> 49 57 </permission-map> … … 101 109 <guard-role>SectionManager</guard-role> 102 110 <guard-role>Owner</guard-role> 111 <guard-role>CourseAdviser</guard-role> 103 112 </guard> 104 113 </transition> … … 112 121 <guard-role>SectionManager</guard-role> 113 122 <guard-role>Owner</guard-role> 123 <guard-role>CourseAdviser</guard-role> 114 124 </guard> 115 125 </transition> … … 141 151 <guard-role>SectionManager</guard-role> 142 152 <guard-role>Owner</guard-role> 153 <guard-role>CourseAdviser</guard-role> 143 154 </guard> 144 155 </transition> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
r1482 r1515 110 110 </state> 111 111 <state state_id="courses_registered" title=""> 112 <exit-transition transition_id=" notify_change_courses"/>112 <exit-transition transition_id="reject_courses"/> 113 113 <exit-transition transition_id="validate_courses"/> 114 114 <permission-map name="View" acquired="True"> … … 118 118 </state> 119 119 <state state_id="courses_validated" title=""> 120 <exit-transition transition_id="reject_courses"/> 120 121 <permission-map name="View" acquired="True"> 121 122 <permission-role>Owner</permission-role> … … 226 227 new_state="admitted" trigger="USER" 227 228 before_script="" after_script=""> 228 229 229 230 <guard> 230 231 <guard-role>SectionOfficer</guard-role> … … 237 238 new_state="admission_applied" trigger="USER" 238 239 before_script="" after_script=""> 239 240 240 241 <guard> 241 242 <guard-role>SectionOfficer</guard-role> … … 248 249 new_state="cleared_and_validated" 249 250 trigger="USER" before_script="" after_script=""> 250 251 251 252 <guard> 252 253 <guard-role>SectionOfficer</guard-role> … … 259 260 new_state="student_created" trigger="USER" 260 261 before_script="" after_script=""> 261 262 262 263 <guard> 263 264 <guard-role>Manager</guard-role> … … 271 272 new_state="" trigger="USER" before_script="" 272 273 after_script=""> 273 274 274 275 <guard> 275 276 <guard-role>Manager</guard-role> … … 283 284 new_state="deferred" trigger="USER" 284 285 before_script="" after_script=""> 285 286 286 287 <guard> 287 288 <guard-role>SectionOfficer</guard-role> … … 294 295 new_state="application_pin_entered" 295 296 trigger="USER" before_script="" after_script=""> 296 297 297 298 <guard> 298 299 <guard-role>SectionOfficer</guard-role> … … 305 306 new_state="clearance_pin_entered" 306 307 trigger="USER" before_script="" after_script=""> 307 308 308 309 <guard> 309 310 <guard-role>SectionOfficer</guard-role> … … 316 317 new_state="finally_rejected" trigger="USER" 317 318 before_script="" after_script=""> 318 319 <guard> 320 <guard-role>SectionOfficer</guard-role> 321 <guard-role>ClearanceOfficer</guard-role> 322 <guard-role>Manager</guard-role> 323 <guard-role>SectionManager</guard-role> 324 </guard> 325 </transition> 326 <transition transition_id="notify_change_courses" title="" 327 new_state="school_fee_paid" trigger="USER" 328 before_script="" after_script=""> 329 330 <guard> 331 <guard-role>CourseAdviser</guard-role> 319 320 <guard> 321 <guard-role>SectionOfficer</guard-role> 322 <guard-role>ClearanceOfficer</guard-role> 332 323 <guard-role>Manager</guard-role> 333 324 <guard-role>SectionManager</guard-role> … … 337 328 new_state="school_fee_paid" trigger="USER" 338 329 before_script="" after_script=""> 339 330 340 331 <guard> 341 332 <guard-role>Manager</guard-role> … … 348 339 new_state="pume_failed" trigger="USER" 349 340 before_script="" after_script=""> 350 341 351 342 <guard> 352 343 <guard-role>SectionOfficer</guard-role> … … 359 350 new_state="pume_passed" trigger="USER" 360 351 before_script="" after_script=""> 361 352 362 353 <guard> 363 354 <guard-role>SectionOfficer</guard-role> … … 370 361 new_state="objection_raised" trigger="USER" 371 362 before_script="" after_script=""> 372 363 373 364 <guard> 374 365 <guard-role>SectionOfficer</guard-role> … … 382 373 new_state="courses_registered" trigger="USER" 383 374 before_script="" after_script=""> 384 385 <guard> 375 376 <guard> 377 <guard-role>CourseAdviser</guard-role> 386 378 <guard-role>Manager</guard-role> 387 379 <guard-role>SectionManager</guard-role> … … 392 384 new_state="admission_rejected" trigger="USER" 393 385 before_script="" after_script=""> 394 386 395 387 <guard> 396 388 <guard-role>SectionOfficer</guard-role> … … 403 395 new_state="clearance_pin_entered" 404 396 trigger="USER" before_script="" after_script=""> 405 406 <guard> 407 <guard-role>SectionOfficer</guard-role> 408 <guard-role>ClearanceOfficer</guard-role> 397 398 <guard> 399 <guard-role>SectionOfficer</guard-role> 400 <guard-role>ClearanceOfficer</guard-role> 401 <guard-role>Manager</guard-role> 402 <guard-role>SectionManager</guard-role> 403 </guard> 404 </transition> 405 <transition transition_id="reject_courses" title="" 406 new_state="school_fee_paid" trigger="USER" 407 before_script="" after_script=""> 408 409 <guard> 410 <guard-role>CourseAdviser</guard-role> 411 <guard-role>SectionOfficer</guard-role> 409 412 <guard-role>Manager</guard-role> 410 413 <guard-role>SectionManager</guard-role> … … 414 417 new_state="clearance_requested" trigger="USER" 415 418 before_script="" after_script=""> 416 419 417 420 <guard> 418 421 <guard-role>SectionOfficer</guard-role> … … 425 428 new_state="returning" trigger="USER" 426 429 before_script="" after_script=""> 427 430 428 431 <guard> 429 432 <guard-role>SectionOfficer</guard-role> … … 435 438 new_state="courses_validated" trigger="USER" 436 439 before_script="" after_script=""> 437 440 438 441 <guard> 439 442 <guard-role>CourseAdviser</guard-role> … … 447 450 <description>Time of the last transition</description> 448 451 <default> 449 452 450 453 <expression>state_change/getDateTime</expression> 451 454 </default> -
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.