Changeset 3494 for WAeUP_SRP


Ignore:
Timestamp:
8 May 2008, 09:35:54 (17 years ago)
Author:
joachim
Message:

implement certificates_catalog

Location:
WAeUP_SRP
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Widgets.py

    r3493 r3494  
    857857            application_category = "basic"
    858858        if not hasattr(self,'_v_certificates_docs'):
    859             res = self.portal_catalog_real.search({'meta_type': "Certificate"})
     859            # res = self.portal_catalog_real.search({'meta_type': "Certificate"})
     860            # d = {}
     861            # for cert in res:
     862            #     c = cert.getObject().getContent()
     863            #     if getattr(c,'application_category',''):
     864            #         d[cert.getId] = c
     865            res = self.certificates_catalog()
    860866            d = {}
    861867            for cert in res:
    862                 c = cert.getObject().getContent()
    863                 if getattr(c,'application_category',''):
    864                     d[cert.getId] = c
     868                if getattr(cert,'application_category',''):
     869                    d[cert.code] = cert
    865870            self._v_certificates_docs = d
    866871        l  = [('','','')]
  • WAeUP_SRP/base/exportimport.py

    r3299 r3494  
    125125    importWAeUPTable(site.portal_accommodation, '', context,'accommodation')
    126126    importWAeUPTable(site.courses_catalog, '', context,'courses_catalog')
     127    importWAeUPTable(site.certificates_catalog, '', context,'certificates_catalog')
    127128    importWAeUPTable(site.payments_catalog, '', context,'payments_catalog')
    128129    importWAeUPTable(site.online_payments_import, '', context,'online_payments_import')
  • WAeUP_SRP/base/skins/waeup_academics/getCertificatesVoc.py

    r3339 r3494  
    55
    66"""
     7# if key is None:
     8#     res = context.portal_catalog.search({'meta_type': "Certificate"})
     9#     return [(d.getId,d.Title,) for d in res]
     10# res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key})
     11# if res:
     12#     return res[0].Title
    713if key is None:
    8     res = context.portal_catalog.search({'meta_type': "Certificate"})
    9     return [(d.getId,d.Title,) for d in res]
    10 res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key})
     14    res = context.certificates_catalog()
     15    return [(d.code,d.title,) for d in res]
     16res = context.certificates_catalog(code=key)
    1117if res:
    12     return res[0].Title
     18    return res[0].title
    1319raise KeyError
  • WAeUP_SRP/uniben/profiles/default/toolset.xml

    r2094 r3494  
    77 <required tool_id="portal_accommodation"
    88           class="Products.WAeUP_SRP.WAeUPTables.AccommodationTable"/>
     9 <required tool_id="applicants_catalog"
     10           class="Products.WAeUP_SRP.WAeUPTables.ApplicantsCatalog"/>
     11 <required tool_id="certificates_catalog"
     12           class="Products.WAeUP_SRP.WAeUPTables.CertificatesCatalog"/>
    913 <required tool_id="courses_catalog"
    1014           class="Products.WAeUP_SRP.WAeUPTables.CoursesCatalog"/>
     15 <required tool_id="course_results"
     16           class="Products.WAeUP_SRP.WAeUPTables.CourseResults"/>
    1117 <required tool_id="payments_catalog"
    1218           class="Products.WAeUP_SRP.WAeUPTables.PaymentsCatalog"/>
     
    2329 <required tool_id="students_catalog"
    2430           class="Products.WAeUP_SRP.WAeUPTables.StudentsCatalog"/>
    25  <required tool_id="applicants_catalog"
    26            class="Products.WAeUP_SRP.WAeUPTables.ApplicantsCatalog"/>
    27  <required tool_id="course_results"
    28            class="Products.WAeUP_SRP.WAeUPTables.CourseResults"/>
    2931 <required tool_id="waeup_tool"
    3032           class="Products.WAeUP_SRP.WAeUPTool.WAeUPTool"/>
Note: See TracChangeset for help on using the changeset viewer.