source: WAeUP_SRP/trunk/skins/waeup_aaue/getSchoolFee.py @ 6832

Last change on this file since 6832 was 4293, checked in by Henrik Bettermann, 15 years ago

resolve aaue #31

File size: 2.9 KB
RevLine 
[3841]1## Script (Python) "getSchoolFee"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=brain=None
8##title=
9##
10# $Id: getSchoolFee.py 2534 2007-11-05 06:37:12Z henrik $
11"""
12return SchoolFee
13"""
[3872]14MBL= ('MBA','MPAD','LLMCPL','LLMPIL')
[3841]15
16d = {}
17
[4014]18d['all'] = 0
19
[3872]20if brain.mode.endswith('_ft'):
[3898]21    # fresh full-time Foundation
[4119]22    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated' and brain.entry_mode == 'rm_ft':
23        d['all'] = 65000
24       
[3898]25    # fresh tull-time students INE
[3873]26    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty == 'INE':
[4119]27        d['all'] = 44000
[3898]28    # returning full-time students INE
29    elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning' and brain.faculty == 'INE':
[4119]30        d['all'] = 26300
31       
[3898]32    # postgrad full-time students (fresh)
[3872]33    elif str(brain.level) == ('600') and brain.review_state == 'cleared_and_validated':
[4119]34        if brain.lga == 'foreigner':
[3872]35            d['all'] = 189500
[3873]36        else:
[4119]37            d['all'] = 62500
[3898]38    # MBL students (fresh or returning)       
[3907]39    elif str(brain.level) in ('700','800','710','810') and brain.course in MBL:
[4119]40        if brain.lga == 'foreigner':
[3872]41            d['all'] = 269500
[3873]42        else:
[4119]43            d['all'] = 89500
[3898]44    # non-MBL students (fresh or returning)   
[3873]45    elif str(brain.level) in ('700','800','710','810'):
46        if brain.lga == 'foreigner':
[3872]47            d['all'] = 219500
[3873]48        else:
[4119]49            d['all'] = 69500
[3898]50    # PHD Students       
51    elif str(brain.level) in ('900','910','1000','1010'):
[3873]52        if brain.lga == 'foreigner':
[3872]53            d['all'] = 269500
[3873]54        else:
[4119]55            d['all'] = 99500         
[4118]56
[4293]57    elif brain.mode == 'dp_ft':
58        # fresh Diploma students
59        if str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
60                d['all'] = 65000
61        # returning Diploma students
62        elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning':
63            d['all'] = 50000
[4014]64       
65elif brain.mode.endswith('_pt'):
66    # fresh part-time students
[4118]67    if str(brain.level) in ('100','200') and brain.review_state == 'cleared_and_validated':
[4119]68        d['all'] = 45000
[4014]69    # returning part-time students
70    elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning':
[4119]71        d['all'] = 30000
[3872]72    # postgrad part-time students
[3873]73    elif str(brain.level) == '600' and brain.review_state == 'cleared_and_validated':
[4119]74        if brain.lga == 'foreigner':
[3872]75            d['all'] = 219500
[3873]76        else:
[4119]77            d['all'] = 64500
[3841]78
79
80next_info = context.getNextInfo(brain)
81next_session_str = next_info['next_session_str']
82d['next_session_id'] = next_info['next_session_id']
83d['description'] = "School Fee for Session %s" % next_session_str
84
[4014]85return d
Note: See TracBrowser for help on using the repository browser.