Last change
on this file since 3349 was
3346,
checked in by joachim, 17 years ago
|
fix for #108 fceokene: additional commas in csv-files are ignored
getCertificatesDict now returns a dictionary of dictinaries
admitOne uses it.
|
File size:
568 bytes
|
Line | |
---|
1 | ##parameters=key=None |
---|
2 | # $Id: getCertificatesVoc.py 3254 2008-02-28 13:06:20Z joachim $ |
---|
3 | """ |
---|
4 | Return the certificates as dictionary |
---|
5 | |
---|
6 | try: |
---|
7 | from Products.zdb import set_trace |
---|
8 | except: |
---|
9 | def set_trace(): |
---|
10 | pass |
---|
11 | """ |
---|
12 | |
---|
13 | res = context.portal_catalog.search({'meta_type': "Certificate"}) |
---|
14 | dict = {} |
---|
15 | |
---|
16 | for d in res: |
---|
17 | c = d.getObject().getContent() |
---|
18 | if not hasattr(c,'study_mode'): |
---|
19 | continue |
---|
20 | #dict[d.getId] = (c.title,c.study_mode) |
---|
21 | dict[d.getId] = {'title': c.title, |
---|
22 | 'study_mode': c.study_mode, |
---|
23 | } |
---|
24 | return dict |
---|
25 | |
---|
Note: See
TracBrowser for help on using the repository browser.