source: WAeUP_SRP/base/skins/waeup_academics/getCosCombinedVoc.py @ 2813

Last change on this file since 2813 was 2812, checked in by joachim, 18 years ago

new vocabulary cos_combined

  • Property svn:keywords set to Id
File size: 488 bytes
Line 
1##parameters=key=None
2# $Id: getCosCombinedVoc.py 2812 2007-11-28 10:35:41Z joachim $
3"""
4Return the combined courses as an vocabulary
5
6"""
7if 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        l += (k,v),
13    return l
14for voc in (context.portal_vocabularies.cos,
15            context.portal_vocabularies.cos_cest):
16    title = voc.get(key,None)
17    if title is not None:
18        return title
19return "unknown Course  %s" % key
Note: See TracBrowser for help on using the repository browser.