source:
WAeUP_SRP/base/skins/waeup_academics/getCertificatesVoc.py
@
3011
Last change on this file since 3011 was 2727, checked in by , 17 years ago | |
---|---|
|
|
File size: 353 bytes |
Line | |
---|---|
1 | ##parameters=key=None |
2 | # $Id: getCertificatesVoc.py 2727 2007-11-21 14:12:30Z joachim $ |
3 | """ |
4 | Return the faculties as an vocabulary |
5 | |
6 | """ |
7 | if key is None: |
8 | res = context.portal_catalog.search({'meta_type': "Certificate"}) |
9 | return [(d.getId,d.Title,) for d in res] |
10 | res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key}) |
11 | if res: |
12 | return [-1].Title |
13 | return "unknown Faculty %s" % key |
Note: See TracBrowser for help on using the repository browser.