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 | """ |
---|
12 | return SchoolFee |
---|
13 | """ |
---|
14 | |
---|
15 | |
---|
16 | ARTS = ('CRS','ISS','MUS','SOS','THA','PES','ECO','GEO') |
---|
17 | |
---|
18 | # SCS = ('BIO','HEC','MAT','ARB','ISC','IGB','YOR','HAU','ENG ','FRE','PHY ','CSC','PHE','AGE','FAA','BED','HEC') |
---|
19 | |
---|
20 | d = {} |
---|
21 | |
---|
22 | if not brain.mode.endswith('_sw'): |
---|
23 | # PRENCE |
---|
24 | if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated': |
---|
25 | if brain.department in ARTS: |
---|
26 | d['all'] = 14770 |
---|
27 | else: |
---|
28 | d['all'] = 15370 |
---|
29 | # NCE I (fresh) |
---|
30 | elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated': |
---|
31 | if brain.department in ARTS: |
---|
32 | d['all'] = 9820 |
---|
33 | else: |
---|
34 | d['all'] = 10420 |
---|
35 | # new addition for prence to nce-i students whose fees are different from other nce-i students |
---|
36 | elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.entry_mode == 'prence': |
---|
37 | if brain.department in ARTS: |
---|
38 | d['all'] = 13320 |
---|
39 | else: |
---|
40 | d['all'] = 14420 |
---|
41 | # NCE I repeaters |
---|
42 | elif str(brain.level) in ('100','110') and brain.review_state == 'returning' and brain.verdict == 'C': |
---|
43 | if brain.department in ARTS: |
---|
44 | d['all'] = 8320 |
---|
45 | else: |
---|
46 | d['all'] = 8920 |
---|
47 | # NCE II |
---|
48 | elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning': |
---|
49 | if brain.department in ARTS: |
---|
50 | d['all'] = 5450 |
---|
51 | else: |
---|
52 | d['all'] = 6050 |
---|
53 | # NCE II repeaters |
---|
54 | elif str(brain.level) in ('200','210') and brain.verdict == 'C': |
---|
55 | if brain.department in ARTS: |
---|
56 | d['all'] = 5450 |
---|
57 | else: |
---|
58 | d['all'] = 6050 |
---|
59 | # NCE III |
---|
60 | elif str(brain.level) in ('200','210','220'): |
---|
61 | if brain.department in ARTS: |
---|
62 | d['all'] = 6200 |
---|
63 | else: |
---|
64 | d['all'] = 6800 |
---|
65 | # NCE III repeaters and spillover |
---|
66 | elif str(brain.level) in ('300','310') and brain.verdict in ('B','C'): |
---|
67 | if brain.department in ARTS: |
---|
68 | d['all'] = 4950 |
---|
69 | else: |
---|
70 | d['all'] = 5550 |
---|
71 | |
---|
72 | else: |
---|
73 | d['all'] = 0 |
---|
74 | else: |
---|
75 | # all repeaters |
---|
76 | if brain.verdict == 'C': |
---|
77 | d['all'] = 9000 |
---|
78 | # NCE I |
---|
79 | elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated': |
---|
80 | d['all'] = 11000 |
---|
81 | # NCE II |
---|
82 | elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning': |
---|
83 | d['all'] = 10000 |
---|
84 | # NCE III |
---|
85 | elif str(brain.level) in ('200','210','220'): |
---|
86 | d['all'] = 9500 |
---|
87 | # NCE IV |
---|
88 | elif str(brain.level) in ('300','310','320'): |
---|
89 | d['all'] = 9500 |
---|
90 | # NCE IV spillover |
---|
91 | elif str(brain.level) in ('400','410','420') and brain.verdict == 'B': |
---|
92 | d['all'] = 9000 |
---|
93 | else: |
---|
94 | d['all'] = 0 |
---|
95 | |
---|
96 | |
---|
97 | next_info = context.getNextInfo(brain) |
---|
98 | next_session_str = next_info['next_session_str'] |
---|
99 | d['next_session_id'] = next_info['next_session_id'] |
---|
100 | d['description'] = "School Fee for Session %s" % next_session_str |
---|
101 | |
---|
102 | return d |
---|
103 | |
---|