## Script (Python) "getWAeUPGroups" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=key=None # $Id: getWAeUPGroups.py 2564 2007-11-07 10:50:54Z joachim $ """ Retun the groups as an vocabulary """ if context.isStudent(): return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) groups = context.portal_directories.groups.searchEntries(group='*') if key is None: return [(g,g) for g in groups] if key in groups: return key return "unknown Group %s" % key