source: WAeUP_SRP/base/skins/waeup_academics/getFacultiesVoc.py @ 2728

Last change on this file since 2728 was 2728, checked in by joachim, 17 years ago

rename methods

  • Property svn:keywords set to Id
File size: 345 bytes
RevLine 
[173]1##parameters=key=None
2# $Id: getFacultiesVoc.py 2728 2007-11-21 14:13:36Z joachim $
3"""
4Return the faculties as an vocabulary
5
6"""
[265]7if key is None:
8    res = context.portal_catalog.search({'meta_type': "Faculty"})   
9    return [(d.getId,d.Title,) for d in res]
[312]10res = context.portal_catalog.search({'meta_type': "Faculty", 'id': key})
11if res:
12    return [-1].Title
[313]13return "unknown Faculty %s" % key
Note: See TracBrowser for help on using the repository browser.