Changeset 1066


Ignore:
Timestamp:
15 Dec 2006, 15:28:29 (18 years ago)
Author:
joachim
Message:

use students_catalog for getRolesInContext

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py

    r1035 r1066  
    8080        if sc is None:
    8181            break
    82         dep_id = real_object.study_course.getContent().department
     82        res = self.students_catalog(id=self.getStudentId())
     83        if len(res) != 1:
     84            break
     85        dep_id = res[0].department
    8386        res = self.portal_catalog(portal_type="Department",id=dep_id)
    8487        if len(res) != 1:
    8588            break
    8689        dynamic_roles = self.getRolesInContext(res[0].getObject())
    87         #import pdb;pdb.set_trace()
    88         for dr in self.getDynamicRoles():
     90        for dr in ('ClearanceOfficer','CourseAdviser', 'SectionManager'):
    8991            if dr in dynamic_roles:
    9092                roles.append(dr)
Note: See TracChangeset for help on using the changeset viewer.