Ignore:
Timestamp:
2 Feb 2008, 14:38:10 (17 years ago)
Author:
Henrik Bettermann
Message:

use new, previous and arrived

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py

    r3087 r3089  
    8383booking_allowed = False
    8484
    85 # new = student_record.entry_session == session[0]
    86 # arrived = student_record.session == session[0]
    87 
    88 # if new and arrived and student_record.review_state in new_states:
    89 #     booking_allowed = True
    90 # elif arrived:
    91 #     dummy,on_probation = divmod(int(student_record.level),100)
    92 #     if not on_probation:
    93 #         booking_allowed = True
    94 # elif int(student_record.session) == int(session[0]) - 1:
    95 #     if student_record.verdict in ('A','B',):
    96 #         booking_allowed = True
    97 if student_record.session == session[0]:
    98     if student_record.entry_session == session[0]:
     85new = student_record.entry_session == session[0]
     86arrived = student_record.session == session[0]
     87previous = int(student_record.session) == int(session[0]) - 1
     88if arrived:
     89    if new:
    9990        booking_allowed = student_record.review_state in new_states
    10091    else:
    10192        booking_allowed = not (int(student_record.level) % 100)
    102 elif int(student_record.session) == int(session[0]) - 1:
     93elif previous:
    10394    booking_allowed = student_record.verdict in ('A','B',)
    104    
     95
    10596info['booking_allowed'] = booking_allowed
    10697if not booking_allowed:
    10798    info['acco'] = None
    108 #    return info
    10999
    110100acco_id = 'accommodation_' + session[0]
Note: See TracChangeset for help on using the changeset viewer.