Changeset 3499
- Timestamp:
- 18 May 2008, 20:34:27 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_academics/getCertificatesDict.py
r3346 r3499 1 ##parameters=key=None 2 # $Id: getCertificatesVoc.py 3254 2008-02-28 13:06:20Z joachim $ 1 # $Id: getCertificatesDict.py 3254 2008-02-28 13:06:20Z joachim $ 3 2 """ 4 Return the certificates as dictionary5 6 try:7 from Products.zdb import set_trace8 except:9 def set_trace():10 pass11 3 """ 12 4 13 res = context. portal_catalog.search({'meta_type': "Certificate"})5 res = context.certificates_catalog() 14 6 dict = {} 15 7 16 8 for d in res: 17 c = d.getObject().getContent() 18 if not hasattr(c,'study_mode'): 9 if not d.study_mode: 19 10 continue 20 #dict[d.getId] = (c.title,c.study_mode) 21 dict[d.getId] = {'title': c.title, 22 'study_mode': c.study_mode, 11 dict[d.code] = {'title': d.title, 12 'study_mode': d.study_mode, 23 13 } 24 14 return dict 25
Note: See TracChangeset for help on using the changeset viewer.