Last change
on this file since 3116 was
2847,
checked in by Henrik Bettermann, 17 years ago
|
move files into uniben's waeup_custom
|
File size:
561 bytes
|
Rev | Line | |
---|
[2847] | 1 | ##parameters=key=None |
---|
| 2 | # $Id: getCosCombinedVoc.py 2814 2007-11-28 12:26:51Z henrik $ |
---|
| 3 | """ |
---|
| 4 | Return the combined courses as an vocabulary |
---|
| 5 | |
---|
| 6 | """ |
---|
| 7 | if key is None: |
---|
| 8 | l = [] |
---|
| 9 | for k,v in context.portal_vocabularies.cos.items(): |
---|
| 10 | l += (k,v), |
---|
| 11 | for k,v in context.portal_vocabularies.cos_cest.items(): |
---|
| 12 | if k: |
---|
| 13 | l += (k,v), |
---|
| 14 | return l |
---|
| 15 | for voc in (context.portal_vocabularies.cos, |
---|
| 16 | context.portal_vocabularies.cos_cest): |
---|
| 17 | title = voc.get(key,None) |
---|
| 18 | if title is not None: |
---|
| 19 | return title |
---|
| 20 | return "unknown course %s" % key |
---|
Note: See
TracBrowser for help on using the repository browser.