Changeset 3903 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 3 Feb 2009, 08:19:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/get_searchable_student_states.py
r1871 r3903 17 17 roles = member.getRolesInContext(context) 18 18 voc = context.portal_vocabularies.searchable_student_states 19 20 19 if key is not None: 21 20 return voc.get(key) 21 voc_filtered = [('all', 'all states')] 22 22 if "ClearanceOfficers" in member.getGroups(): 23 return [item for item in voc.items() if item[0].startswith('clear') or 24 item[0] in ("all",)] 25 elif "CourseAdvisers" in member.getGroups(): 26 return [item for item in voc.items() if item[0].startswith('courses') or 27 item[0] in ("all",)] 28 return voc.items() 23 voc_filtered += [item for item in voc.items() if item[0].startswith('clear')] 24 if "CourseAdvisers" in member.getGroups(): 25 voc_filtered += [item for item in voc.items() if item[0].startswith('courses')] 26 27 if len(voc_filtered) > 1: 28 return voc_filtered 29 else: 30 return voc.items() 29 31 30 32
Note: See TracChangeset for help on using the changeset viewer.