Changeset 2057


Ignore:
Timestamp:
26 Jul 2007, 07:09:20 (17 years ago)
Author:
Henrik Bettermann
Message:

fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py

    r2055 r2057  
    88def getCertificateObject(self,st_entry):
    99    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)
    1412    except:
    1513        return None
    16    
     14
    1715security.declarePublic('getRolesInContext')
    1816def getRolesInContext(self, object):
     
    7977            roles.append(r)
    8078    ## patch to assign dynamic roles for WAeUP
    81     while 1:       
     79    while 1:
    8280        #if self.isStudent():
    8381        #    break
     
    9088        #except:
    9189        #    break
    92         o = ord(name[1]) 
     90        o = ord(name[1])
    9391        if o >= 48 and o <= 57:
    9492            break
     
    112110        #if real_object.portal_type == real_object.meta_type:
    113111        #    break
    114        
     112
    115113        # can be later simplified by replacing by students_catalog values - Henrik
    116114        # getattr works always because of acquisition ?! Henrik
     
    151149            certificate_obj = getCertificateObject(self,st_entry)
    152150            if certificate_obj is None:
     151                #from pdb import set_trace;set_trace()
    153152                break
    154153            if real_object.meta_type.endswith('Folder'): # it is a proxy
     
    170169            certificate_obj = getCertificateObject(self,st_entry)
    171170            if certificate_obj is None:
     171                #from pdb import set_trace;set_trace()
    172172                break
    173173            allowed = set(('CourseAdviser', 'SectionManager'))
Note: See TracChangeset for help on using the changeset viewer.