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

Last change on this file since 3880 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
Line 
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"""
14MBL= ('MBA','MPAD','LLMCPL','LLMPIL')
15
16d = {}
17
18if brain.mode.endswith('_ft'):
19    # fresh full-time remedial  (not in table???)
20    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
21        if brain.lga.startswith('edo'):
22            d['all'] = 50000
23        else:
24            d['all'] = 60000
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'):
28            d['all'] = 22000
29        else:
30            d['all'] = 0
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'):
34            d['all'] = 4300
35        else:
36            d['all'] = 0
37    # postgrad full-time students (fresh???)
38    elif str(brain.level) == ('600') and brain.review_state == 'cleared_and_validated':
39        if brain.lga.startswith('edo'):
40            d['all'] = 62500
41        elif brain.lga == 'foreigner':
42            d['all'] = 189500
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'):
48            d['all'] = 89500
49        elif brain.lga == 'foreigner':
50            d['all'] = 269500
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'):
56            d['all'] = 69500
57        if brain.lga == 'foreigner':
58            d['all'] = 219500
59        else:
60            d['all'] = 79500
61    # PHD ????       
62    elif str(brain.level) in ('900','1000','1001'):
63        if brain.lga.startswith('edo'):
64            d['all'] = 99500
65        if brain.lga == 'foreigner':
66            d['all'] = 269500
67        else:
68            d['all'] = 109500             
69else:
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'):
73            d['all'] = 45000
74        else:
75            d['all'] = 55000
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'):
79            d['all'] = 30000
80        else:
81            d['all'] = 40000
82    # postgrad part-time students
83    elif str(brain.level) == '600' and brain.review_state == 'cleared_and_validated':
84        if brain.lga.startswith('edo'):
85            d['all'] = 64500
86        if brain.lga == 'foreigner':
87            d['all'] = 219500
88        else:
89            d['all'] = 74500
90else:
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
100
Note: See TracBrowser for help on using the repository browser.