Ignore:
Timestamp:
23 Feb 2007, 15:42:59 (18 years ago)
Author:
Henrik Bettermann
Message:

searches also for jamb_reg_no in students_catalog

File:
1 edited

Legend:

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

    r1446 r1479  
    137137                             allowed = allowed,
    138138                             )
    139 st_queries = ('jamb_reg_no','matric_no','name')
     139#st_queries = ('jamb_reg_no','matric_no','name')
    140140review_res = None
    141141query = None
     
    160160        res = context.students_catalog(matric_no=term.strip())
    161161        search_set = [r.id for r in res]
    162     elif what in st_queries:
    163         if what == "jamb_reg_no":
    164             pt = ('StudentApplication',)
    165             st = "%s" % term.strip().lower()
    166         elif what == "name":
    167             pt = ('StudentPersonal')
    168             st = "%s" % term.strip()
     162    elif what == "jamb_reg_no":
     163        st = "%s" % term.strip().lower()
     164        res = context.students_catalog(jamb_reg_no=st)
     165        search_set = [r.id for r in res]
     166    elif what == "name":
     167        pt = ('StudentPersonal')
    169168        query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip())
    170169        res = evalAdvancedQuery(query)
     
    173172                pl = r.getPath().split('/')
    174173                search_set.append(pl[pl.index('students') + 1])
     174
     175
    175176if only_review or with_review or co_view:
    176177    if with_timer:
Note: See TracChangeset for help on using the changeset viewer.