Changeset 1870 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
8 Jun 2007, 16:13:05 (18 years ago)
Author:
joachim
Message:

get student review_state from students_catalog

Location:
WAeUP_SRP/trunk/skins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_default/getReviewInfo.py

    r1819 r1870  
    2525    d_review = ''
    2626if context.portal_type != "Student":
    27     student_id = context.getStudentId()
    28     if student_id:
    29         res = context.portal_catalog(id = student_id,portal_type='Student')
    30         if res:
    31             s_review = res[-1].review_state
    32             return "%s / %s" % (s_review,d_review)
     27    s_review = context.getStudentReviewState()
     28    if s_review:
     29        return "%s / %s" % (s_review,d_review)
     30    # student_id = context.getStudentId()
     31    # if student_id:
     32    #     res = context.portal_catalog(id = student_id,portal_type='Student')
     33    #     if res:
     34    #         return "%s / %s" % (s_review,d_review)
    3335return "%s" % (d_review)
    3436
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentReviewState.py

    r1845 r1870  
    1212return the review_state of the Student
    1313"""
    14 from Products.AdvancedQuery import Eq, Between, Le,In
    1514try:
    16     aq_portal = context.portal_catalog.evalAdvancedQuery
     15    from Products.zdb import set_trace
    1716except:
    18     aq_portal = context.portal_catalog_real.evalAdvancedQuery
     17    def set_trace():
     18        pass
     19# from Products.AdvancedQuery import Eq, Between, Le,In
     20# try:
     21#     aq_portal = context.portal_catalog.evalAdvancedQuery
     22# except:
     23#     aq_portal = context.portal_catalog_real.evalAdvancedQuery
    1924if student_id is None:
    2025    student_id = context.getStudentId()
    21 query = Eq('id',student_id)
    22 res = aq_portal(query)
     26#query = Eq('id',student_id)
     27#res = aq_portal(query)
     28res = context.students_catalog(id = student_id)
    2329if not res:
    2430    return None
Note: See TracChangeset for help on using the changeset viewer.