Changeset 2869 for WAeUP_SRP


Ignore:
Timestamp:
6 Dec 2007, 15:13:54 (17 years ago)
Author:
joachim
Message:

should fix #428 please test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/PatchCPSUserFolderUserFolder.py

    r2708 r2869  
    113113                object = real_object.aq_parent
    114114            level = object.getId()
     115            d,m = divmod(int(level),100)
     116            if m: # its repeater
     117                level = "%s" % (d*100)
    115118            context_obj = getattr(certificate_obj,level,None)
    116             if context_obj is None:
    117                 #from pdb import set_trace;set_trace()
    118                 break
     119            if context_obj is None and d > 3:
     120                #may-be spillover
     121                level = "%s" % ((d-1)*100)
     122                context_obj = getattr(certificate_obj,level,None)
     123                if context_obj is None:
     124                    #from pdb import set_trace;set_trace()
     125                    break
    119126            allowed = set(('CourseAdviser', 'SectionManager'))
    120127        elif real_object.portal_type == "Student" and "CourseAdvisers" in groups:
Note: See TracChangeset for help on using the changeset viewer.