Changeset 2057
- Timestamp:
- 26 Jul 2007, 07:09:20 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py
r2055 r2057 8 8 def getCertificateObject(self,st_entry): 9 9 try: 10 return getattr(getattr(getattr(self.portal_url.getPortalObject().campus.academics, 11 st_entry.faculty), 12 st_entry_department).certificate, 13 st_entry.course) 10 return getattr(getattr(getattr(self.portal_url.getPortalObject().campus.academics,st_entry.faculty), 11 st_entry.department).certificates,st_entry.course) 14 12 except: 15 13 return None 16 14 17 15 security.declarePublic('getRolesInContext') 18 16 def getRolesInContext(self, object): … … 79 77 roles.append(r) 80 78 ## patch to assign dynamic roles for WAeUP 81 while 1: 79 while 1: 82 80 #if self.isStudent(): 83 81 # break … … 90 88 #except: 91 89 # break 92 o = ord(name[1]) 90 o = ord(name[1]) 93 91 if o >= 48 and o <= 57: 94 92 break … … 112 110 #if real_object.portal_type == real_object.meta_type: 113 111 # break 114 112 115 113 # can be later simplified by replacing by students_catalog values - Henrik 116 114 # getattr works always because of acquisition ?! Henrik … … 151 149 certificate_obj = getCertificateObject(self,st_entry) 152 150 if certificate_obj is None: 151 #from pdb import set_trace;set_trace() 153 152 break 154 153 if real_object.meta_type.endswith('Folder'): # it is a proxy … … 170 169 certificate_obj = getCertificateObject(self,st_entry) 171 170 if certificate_obj is None: 171 #from pdb import set_trace;set_trace() 172 172 break 173 173 allowed = set(('CourseAdviser', 'SectionManager'))
Note: See TracChangeset for help on using the changeset viewer.