## Script (Python) "getSchoolFee" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=brain=None,instalment='0' ##title= ## # $Id: getSchoolFee.py 2534 2007-11-05 06:37:12Z henrik $ """ return SchoolFee """ d = {} d['all'] = 0 MPA = ('MPAPT','MEMPT','MMPPT') i2_states = ('school_fee_paid','courses_registered','courses_validated',) if brain.mode == 'ug_sw': # ug_sw students payment does not depend on the current session if str(brain.level) in ('100','200',) and brain.review_state == 'cleared_and_validated': d['all'] = 45000 elif str(brain.level) in ('100',): #200 returning students d['all'] = 45000 else: d['all'] = 35000 elif brain.mode == 'pg_sw': if str(brain.level) == '600' and brain.review_state == 'cleared_and_validated': # only 600 fresh d['all'] = 65000 else: d['all'] = 80000 elif brain.session in ('06','07',) and brain.review_state == 'cleared_and_validated': if brain.mode == 'dp_pt' and str(brain.level) in ('100',): d['all'] = 40000 elif brain.mode == 'ug_pt' and str(brain.level) in ('100','200',): d['all'] = 50000 elif brain.mode == 'pg_pt': if str(brain.level) == '600': # only 600 fresh d['all'] = 60000 if str(brain.level) == '700': # only 700 fresh d['all'] = 75000 elif brain.session in ('06',) and brain.review_state == 'returning': if brain.mode == 'dp_pt': d['all'] = 35000 elif brain.mode == 'ug_pt': d['all'] = 45000 elif brain.mode == 'pg_pt': if str(brain.level) == '600' and brain.verdict == 'C': # 600 repeaters d['all'] = 55000 elif str(brain.level) == '600': # going to register for 700 d['all'] = 75000 else: d['all'] = 65000 elif brain.session in ('07','08','09',): if brain.mode == 'dp_pt': if brain.review_state == 'cleared_and_validated' and str(brain.level) in ('100',) and instalment == '1': d['all'] = 35000 elif brain.review_state in i2_states and str(brain.level) in ('100',) and instalment == '2': d['all'] = 20000 elif brain.review_state == 'returning' and instalment == '1': d['all'] = 25000 elif brain.review_state in i2_states and instalment == '2': d['all'] = 10000 if brain.mode == 'ug_pt': if brain.review_state == 'cleared_and_validated' and str(brain.level) in ('100','200') and instalment == '1': d['all'] = 45000 elif brain.review_state in i2_states and instalment == '2': # 2nd instalment applies to both 200 de fresh and 200 returning d['all'] = 25000 elif brain.review_state == 'returning' and instalment == '1': d['all'] = 20000 if brain.mode == 'pg_pt': # 600 level students (no returning studentsor repeaters) if brain.review_state == 'cleared_and_validated' and str(brain.level) in ('600',) and instalment == '1': d['all'] = 65000 elif brain.review_state in i2_states and str(brain.level) in ('600',) and instalment == '2': d['all'] = 50000 # 700 level students, two different certificate groups, 700 level repeaters and 700 level returning students exist # MPA students elif brain.review_state == 'cleared_and_validated' and str(brain.level) in ('700',) and instalment == '1' and brain.course in MPA: d['all'] = 85000 elif brain.review_state in i2_states and str(brain.level) in ('700',) and instalment == '2' and brain.course in MPA: d['all'] = 80000 # non-MPA students elif brain.review_state == 'cleared_and_validated' and str(brain.level) in ('700',) and instalment == '1': d['all'] = 100000 elif brain.review_state in i2_states and str(brain.level) in ('700',) and instalment == '2': d['all'] = 80000 # 700 level returning students elif brain.review_state == 'returning' and instalment == '1': d['all'] = 35000 elif brain.review_state in i2_states and instalment == '2': d['all'] = 30000 next_info = context.getNextInfo(brain) next_session_str = next_info['next_session_str'] d['next_session_id'] = next_info['next_session_id'] d['description'] = "School Fee for Session %s" % next_session_str return d