Changeset 3085 for WAeUP_SRP/uniben


Ignore:
Timestamp:
1 Feb 2008, 18:22:23 (17 years ago)
Author:
Henrik Bettermann
Message:

prepare hostel allocation in Benin

File:
1 edited

Legend:

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

    r3052 r3085  
    5050                        'BARTTHR',
    5151                        )
    52 pti_certificates = ('BENGIEP',
    53                     'BENGGCPP',
    54                     'BENGEEP',
    55                     'BENGGEP',
    56                     'BENGPEP',
    57                     'BENGMEP',
    58                     )
     52#pti_certificates = ('BENGIEP',
     53#                    'BENGGCPP',
     54#                    'BENGEEP',
     55#                    'BENGGEP',
     56#                    'BENGPEP',
     57#                    'BENGMEP',
     58#                    )
     59
     60
     61new_states = ('cleared_and_validated',
     62              'school_fee_paid',
     63              'courses_registered',
     64              'courses_validated',
     65              )
     66
    5967info['error'] = None
    6068info['matric_no']=student_record.matric_no
     
    7482
    7583booking_allowed = False
    76 if review_state in ('cleared_and_validated','returning','school_fee_paid','courses_registered', 'courses_validated',) and student_record.session == session[0]:
     84
     85new = student_record.entry_session == session[0]
     86arrived = student_record.session == session[0]
     87
     88if new and arrived and student_record.review_state in new_states:
    7789    booking_allowed = True
    78     if student_record.matric_no:
    79         res = context.results_import(matric_no = student_record.matric_no)
    80         if res:
    81             booking_allowed = info['verdict'] in ("A",
    82                                                  "B",)
    83 
    84 #booking_allowed = False
    85 
     90elif arrived:
     91    dummy,on_probation = divmod(int(student_record.level),100)
     92    if not on_probation:
     93        booking_allowed = True
     94elif int(student_record.session) == int(session[0]) - 1:
     95    if student_record.verdict in ('A','B',):
     96        booking_allowed = True
     97   
    8698info['booking_allowed'] = booking_allowed
    8799if not booking_allowed:
     
    102114
    103115d = {}
    104 if review_state == "cleared_and_validated":
     116if new:
    105117    bt = 'fr'
    106 elif int(student_record.level) < 100:
    107     bt = 'pr'
    108118elif int(student_record.level) < int(student_record.end_level):
    109119    bt = 're'
     
    135145elif student_record.course in ekehuan_certificates:
    136146    bt += "_ekenhuan"
    137 elif student_record.course in pti_certificates:
    138     bt += "_pti"
     147#elif student_record.course in pti_certificates:
     148#    bt += "_pti"
    139149
    140150
Note: See TracChangeset for help on using the changeset viewer.