Ignore:
Timestamp:
2 Jun 2007, 11:01:49 (17 years ago)
Author:
joachim
Message:

modifications to use QueueCatalog?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r1582 r1845  
    3131if is_anon:
    3232    allowed = False
     33from Products.AdvancedQuery import Eq, Between, Le,In
    3334try:
    34     from Products.AdvancedQuery import Eq, Between, Le,In
    35     evalAdvancedQuery = context.portal_catalog.evalAdvancedQuery
    36     aq_students = context.students_catalog.evalAdvancedQuery
     35    aq_portal = context.portal_catalog.evalAdvancedQuery
    3736except:
    38     evalAdvancedQuery = None
     37    aq_portal = context.portal_catalog_real.evalAdvancedQuery
     38aq_students = context.students_catalog.evalAdvancedQuery
    3939
    4040def cmp_id(a,b):
     
    8181        query = In('portal_type',('Faculty',)) &\
    8282                 In('localUsersWithRoles', ("user:%s" % member,))
    83         res = evalAdvancedQuery(query)
     83        res = aq_portal(query)
    8484        logger.info('ClearanceOfficer %s initiated student_search' % member)
    8585        faculties = []
     
    9090        query = In('portal_type',('Department',)) &\
    9191                 In('localUsersWithRoles', ("user:%s" % member,))
    92         res = evalAdvancedQuery(query)
     92        res = aq_portal(query)
    9393        departments = []
    9494        if res:
     
    107107        query = In('portal_type',('StudyLevel',)) &\
    108108                 In('localUsersWithRoles', ("user:%s" % member,))
    109         res = evalAdvancedQuery(query)
     109        res = aq_portal(query)
    110110        logger.info('CourseAdviser %s initiated student_search' % member)
    111111        certificate_level = []
     
    195195        query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip())
    196196        logger.info('%s searches for student with name %s' % (member,term))
    197         res = evalAdvancedQuery(query)
     197        res = aq_portal(query)
    198198        if res:
    199199            for r in res:
     
    207207        logger.info('"%s","start 100"' % member)
    208208    query = Eq('review_state',state)
    209     review_res = evalAdvancedQuery(query)
     209    review_res = aq_portal(query)
    210210
    211211    logger.info('%s searches for students in review_state %s' % (member,state))
Note: See TracChangeset for help on using the changeset viewer.