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

Last change on this file since 3879 was 3873, checked in by Henrik Bettermann, 16 years ago

transform into valid Python code (see also my comments with question marks)

File size: 3.3 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
[3872]18if brain.mode.endswith('_ft'):
[3873]19    # fresh full-time remedial  (not in table???)
[3872]20    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
[3873]21        if brain.lga.startswith('edo'):
22            d['all'] = 50000
[3872]23        else:
24            d['all'] = 60000
[3873]25    # fresh tull-time students
26    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty == 'INE':
27        if brain.lga.startswith('edo'):
[3872]28            d['all'] = 22000
29        else:
30            d['all'] = 0
[3873]31    # returning full-time students (INE???)
32    elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning':
33        if brain.lga.startswith('edo'):
[3872]34            d['all'] = 4300
35        else:
36            d['all'] = 0
[3873]37    # postgrad full-time students (fresh???)
[3872]38    elif str(brain.level) == ('600') and brain.review_state == 'cleared_and_validated':
[3873]39        if brain.lga.startswith('edo'):
[3872]40            d['all'] = 62500
[3873]41        elif brain.lga == 'foreigner':
[3872]42            d['all'] = 189500
[3873]43        else:
44            d['all'] = 69500
45    # MBL students (fresh and/or returning ???)       
46    elif str(brain.level) in ('700','800','710','810') and brain.certificate in MBL:
47        if brain.lga.startswith('edo'):
[3872]48            d['all'] = 89500
[3873]49        elif brain.lga == 'foreigner':
[3872]50            d['all'] = 269500
[3873]51        else:
52            d['all'] = 99500
53    # non-MBL students (fresh and/or returning ???)   
54    elif str(brain.level) in ('700','800','710','810'):
55        if brain.lga.startswith('edo'):
[3872]56            d['all'] = 69500
[3873]57        if brain.lga == 'foreigner':
[3872]58            d['all'] = 219500
[3873]59        else:
60            d['all'] = 79500
61    # PHD ????       
62    elif str(brain.level) in ('900','1000','1001'):
63        if brain.lga.startswith('edo'):
[3872]64            d['all'] = 99500
[3873]65        if brain.lga == 'foreigner':
[3872]66            d['all'] = 269500
[3873]67        else:
68            d['all'] = 109500             
[3841]69else:
[3873]70    # fresh part-time students INE
71    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty == 'INE':
72        if brain.lga.startswith('edo'):
[3872]73            d['all'] = 45000
74        else:
75            d['all'] = 55000
[3873]76    # returning part-time students (INE???))
77    elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning':
78        if brain.lga.startswith('edo'):
[3872]79            d['all'] = 30000
80        else:
81            d['all'] = 40000
82    # postgrad part-time students
[3873]83    elif str(brain.level) == '600' and brain.review_state == 'cleared_and_validated':
84        if brain.lga.startswith('edo'):
[3872]85            d['all'] = 64500
[3873]86        if brain.lga == 'foreigner':
[3872]87            d['all'] = 219500
[3873]88        else:
89            d['all'] = 74500
[3872]90else:
[3841]91    d['all'] = 0
92
93
94next_info = context.getNextInfo(brain)
95next_session_str = next_info['next_session_str']
96d['next_session_id'] = next_info['next_session_id']
97d['description'] = "School Fee for Session %s" % next_session_str
98
99return d
[3872]100
Note: See TracBrowser for help on using the repository browser.