##parameters=key=None
# $Id: getCertificatesVoc.py 3254 2008-02-28 13:06:20Z joachim $
"""
Return the certificates as dictionary

try:
    from Products.zdb import set_trace
except:
    def set_trace():
        pass
"""

res = context.portal_catalog.search({'meta_type': "Certificate"})
dict = {}

for d in res:
    c = d.getObject().getContent()
    if not hasattr(c,'study_mode'):
        continue
    #dict[d.getId] = (c.title,c.study_mode)
    dict[d.getId] = {'title': c.title,
                     'study_mode': c.study_mode,
                     }
return dict

