Changeset 2696
- Timestamp:
- 17 Nov 2007, 18:25:29 (17 years ago)
- Location:
- WAeUP_SRP
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/PatchCPSUserFolderUserFolder.py
r2065 r2696 78 78 ## patch to assign dynamic roles for WAeUP 79 79 while 1: 80 #if self.isStudent(): 81 # break 82 # if re.match(r'\D\d\d\d\d\d\d',name): 83 # break 84 #if len(name) != 7: 85 # break 86 #try: 87 # int(name[1:]) 88 #except: 89 # break 80 90 81 o = ord(name[1]) 91 82 if o >= 48 and o <= 57: … … 103 94 "StudentClearance", 104 95 "StudentStudyLevel", 105 "Student CourseResult",96 "StudentPersonal", 106 97 ): 107 98 break 108 109 # don't test if it is not a proxy110 #if real_object.portal_type == real_object.meta_type:111 # break112 113 # can be later simplified by replacing by students_catalog values - Henrik114 # getattr works always because of acquisition ?! Henrik115 # sc = getattr(real_object,'study_course',None)116 # if sc is None:117 # break118 # sc_obj = sc.getContent()119 # cert_id = sc_obj.study_course120 # res_cert = self.portal_catalog(id = cert_id)121 # if len(res_cert) != 1:122 # break123 # certificate_brain = res_cert[0]124 # certificate_obj = certificate_brain.getObject()125 # cert_path = certificate_brain.getPath().split('/')126 # fac_id = cert_path[-4]127 # dep_id = cert_path[-3]128 # temporary self-healing function129 # deprecated after reindexing the students_catalog130 99 student_id = self.getStudentId() 131 100 res = self.students_catalog(id=student_id) … … 133 102 break 134 103 st_entry = res[0] 135 # if st_entry.faculty != fac_id or\ 136 # st_entry.department != dep_id or\ 137 # st_entry.course != cert_id: 138 # self.students_catalog.modifyRecord(id = student_id, 139 # faculty = fac_id, 140 # department = dep_id, 141 # course = cert_id 142 # ) 143 if real_object.portal_type in ("StudentStudyLevel","StudentCourseResult"): 144 # res_cert = self.portal_catalog(id = st_entry.course) 145 # if len(res_cert) != 1: 146 # break 147 # certificate_brain = res_cert[0] 148 # certificate_obj = certificate_brain.getObject() 104 105 if real_object.portal_type in ("StudentStudyLevel"): 149 106 certificate_obj = getCertificateObject(self,st_entry) 150 107 if certificate_obj is None: … … 157 114 if real_object.portal_type == "StudentStudyLevel": 158 115 level = object.getId() 159 elif real_object.portal_type == "StudentCourseResult":160 level = object.aq_parent.getId()161 116 context_obj = getattr(certificate_obj,level,None) 162 117 if context_obj is None: -
WAeUP_SRP/base/skins/waeup_student/clearance_edit.py
r2695 r2696 79 79 80 80 if clear_doc.firstname and clear_doc.lastname: 81 context.waeup_tool.updateRoleMappingsFor('waeup_studet_subobject_wf',info['per'])82 81 if info['per_review_state'] != 'opened': 83 82 wftool.doActionFor(info['per'],'open') … … 85 84 firstname = clear_doc.firstname.replace('-',' - ') 86 85 firstname = ' '.join([m.capitalize() for m in firstname.split()]) 87 firstname = firstname.replace(' - ','-') 86 firstname = firstname.replace(' - ','-') 88 87 middlename = clear_doc.middlename.replace('-',' - ') 89 88 middlename = ' '.join([m.capitalize() for m in middlename.split()]) 90 middlename = middlename.replace(' - ','-') 89 middlename = middlename.replace(' - ','-') 91 90 lastname = clear_doc.lastname.replace('-',' - ') 92 91 lastname = ' '.join([m.capitalize() for m in lastname.split()]) 93 lastname = lastname.replace(' - ','-') 92 lastname = lastname.replace(' - ','-') 93 # we changed 94 context.waeup_tool.updateRoleMappingsFor('waeup_student_subobject_wf',info['per']) 94 95 per_doc.edit(mapping = {'firstname': firstname, 'middlename': middlename, 'lastname': lastname,}) 95 96 -
WAeUP_SRP/base/skins/waeup_utilities/viewimage.py
r2675 r2696 16 16 def set_trace(): 17 17 pass 18 set_trace() 18 19 if path is None and traverse_subpath: 19 20 traverse_subpath.insert(0,traverse_subpath[0][0]) 20 21 path = "/".join(traverse_subpath) 21 22 #set_trace() 22 23 23 24 return context.waeup_tool.showFsPicture(path) 24 25 #import logging -
WAeUP_SRP/uniben/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
r2089 r2696 87 87 <exit-transition transition_id="create_content"/> 88 88 <permission-map name="Add portal content" acquired="True"> 89 <permission-role>ClearanceOfficer</permission-role> 89 90 <permission-role>CourseAdviser</permission-role> 90 91 <permission-role>SectionOfficer</permission-role> … … 97 98 <permission-map name="Modify portal content" 98 99 acquired="True"> 100 <permission-role>ClearanceOfficer</permission-role> 99 101 <permission-role>CourseAdviser</permission-role> 100 102 <permission-role>Owner</permission-role> … … 102 104 </permission-map> 103 105 <permission-map name="View" acquired="True"> 106 <permission-role>ClearanceOfficer</permission-role> 104 107 <permission-role>CourseAdviser</permission-role> 105 108 <permission-role>Owner</permission-role> … … 110 113 new_state="closed" trigger="USER" 111 114 before_script="" after_script=""> 112 115 116 113 117 <guard> 114 118 <guard-role>SectionOfficer</guard-role> … … 122 126 new_state="content_addable" trigger="USER" 123 127 before_script="" after_script=""> 124 128 129 125 130 <guard> 126 131 <guard-role>SectionOfficer</guard-role> … … 134 139 new_state="created" trigger="USER" 135 140 before_script="" after_script=""> 136 141 142 137 143 <guard> 138 144 </guard> … … 143 149 new_state="" trigger="USER" before_script="" 144 150 after_script=""> 145 151 152 146 153 <guard> 147 154 </guard> … … 151 158 new_state="opened" trigger="USER" 152 159 before_script="" after_script=""> 153 160 161 154 162 <guard> 155 163 <guard-role>SectionOfficer</guard-role>
Note: See TracChangeset for help on using the changeset viewer.