- Timestamp:
- 18 Dec 2006, 17:01:42 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py
r1066 r1076 71 71 ## patch to assign dynamic roles for WAeUP 72 72 while 1: 73 #import pdb; pdb.set_trace()74 73 if callable(real_object) and hasattr(real_object,'im_self'): 75 74 real_object = real_object.im_self … … 80 79 if sc is None: 81 80 break 82 res = self.students_catalog(id=self.getStudentId()) 81 student_id = self.getStudentId() 82 res = self.students_catalog(id=student_id) 83 83 if len(res) != 1: 84 84 break … … 86 86 res = self.portal_catalog(portal_type="Department",id=dep_id) 87 87 if len(res) != 1: 88 break 88 #import pdb; pdb.set_trace() 89 res_sc = self.portal_catalog(portal_type="Certificate", 90 id = sc.getContent().study_course) 91 if len(res_sc) != 1: 92 break 93 cert_path = res_sc[0].getPath().split('/') 94 fac_id = cert_path[-4] 95 dep_id = cert_path[-3] 96 res = self.portal_catalog(portal_type="Department",id=dep_id) 97 if len(res) != 1: 98 break 99 self.students_catalog.modifyRecord(id = student_id, 100 faculty = fac_id, 101 department = dep_id, 102 ) 89 103 dynamic_roles = self.getRolesInContext(res[0].getObject()) 90 104 for dr in ('ClearanceOfficer','CourseAdviser', 'SectionManager'):
Note: See TracChangeset for help on using the changeset viewer.