Last change
on this file since 3702 was
3339,
checked in by Henrik Bettermann, 17 years ago
|
resolve ticket #507
Now we need a fix which replaces current_mode of all students by the certificate study_mode value.
|
-
Property svn:keywords set to
Id
|
File size:
323 bytes
|
Rev | Line | |
---|
[3339] | 1 | ##parameters=key=None |
---|
[173] | 2 | # $Id: getFacultiesVoc.py 3339 2008-03-16 08:38:39Z henrik $ |
---|
| 3 | """ |
---|
| 4 | Return the faculties as an vocabulary |
---|
| 5 | |
---|
| 6 | """ |
---|
[265] | 7 | if key is None: |
---|
[3339] | 8 | res = context.portal_catalog.search({'meta_type': "Faculty"}) |
---|
[265] | 9 | return [(d.getId,d.Title,) for d in res] |
---|
[312] | 10 | res = context.portal_catalog.search({'meta_type': "Faculty", 'id': key}) |
---|
| 11 | if res: |
---|
[3339] | 12 | return res[0].Title |
---|
[3269] | 13 | raise KeyError |
---|
Note: See
TracBrowser for help on using the repository browser.