Ignore:
Timestamp:
17 Sep 2007, 06:49:57 (17 years ago)
Author:
Henrik Bettermann
Message:

revert payment of returning part-time students to scratch card

some stylesheet clean-up

File:
1 edited

Legend:

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

    r1845 r2249  
    1414import logging
    1515logger = logging.getLogger('Skins.search_students')
    16 from DateTime import DateTime
     16#from DateTime import DateTime
    1717#
    1818#with_timer = True
    19 with_timer = False
     19#with_timer = False
    2020#
    2121request = REQUEST
     
    203203
    204204if only_review or with_review or co_view:
    205     if with_timer:
    206         start = DateTime().timeTime()
    207         logger.info('"%s","start 100"' % member)
    208205    query = Eq('review_state',state)
    209206    review_res = aq_portal(query)
     
    211208    logger.info('%s searches for students in review_state %s' % (member,state))
    212209
    213     if with_timer:
    214         end = DateTime().timeTime()
    215         logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    216210if co_view:
    217211    only_review = False
    218212    with_review = True
    219     if with_timer:
    220         start = DateTime().timeTime()
    221         logger.info('"%s","start 200"' % member)
    222213    query = In('faculty',faculties) | In('department',departments)
    223214    res = aq_students(query)
    224     if with_timer:
    225         end = DateTime().timeTime()
    226         logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    227     start = DateTime().timeTime()
    228215    search_set = [r.id for r in res]
    229     if with_timer:
    230         end = DateTime().timeTime()
    231         logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    232216elif ca_view:
    233217    only_review = False
    234218    with_review = True
    235     if with_timer:
    236         start = DateTime().timeTime()
    237         logger.info('"%s","start 200"' % member)
    238219    courses = [cl.split('/')[0] for cl in certificate_level]
    239220    levels = [cl.split('/')[1] for cl in certificate_level]
    240221    query = In('course',courses) & In('level',levels)
    241222    res = aq_students(query)
    242     if with_timer:
    243         end = DateTime().timeTime()
    244         logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    245         start = DateTime().timeTime()
    246223    search_set = [r.id for r in res]
    247     if with_timer:
    248         end = DateTime().timeTime()
    249         logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    250 if with_timer:
    251     logger.info('"%s","start 300"' % member)
    252     start = DateTime().timeTime()
    253224if review_res:
    254225    review_set = [r.getId for r in review_res]
    255 if with_timer:
    256     end = DateTime().timeTime()
    257     logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    258     logger.info('"%s","start 400"' % member)
    259     start = DateTime().timeTime()
    260226if only_review:
    261227    all = review_set
     
    267233else:
    268234    all = search_set
    269 if with_timer:
    270     end = DateTime().timeTime()
    271     logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    272235items = all[:500]
    273236students = []
    274 if with_timer:
    275     logger.info('"%s","start 500"' % member)
    276     start = DateTime().timeTime()
    277237if items:
    278238    for item in items:
     
    288248        else:
    289249            students.append(info)
    290     if with_timer:
    291         end = DateTime().timeTime()
    292         logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
    293 
    294250    return context.search_students_form(rendered = rend,
    295251                             psm = "",
Note: See TracChangeset for help on using the changeset viewer.