source: WAeUP_SRP/trunk/skins/waeup_fceoyo/getSchoolFee.py @ 5012

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

see ticket fceoyo #37

File size: 4.5 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"""
14
15GRP1 = ('BIO','MAT','ISC','PHE','CHM','YOR','ARB','ENG','FRE','HAU','IGB')
16GRP2 = ('MUS','THA')
17GRP3 = ('ECO','GEO','SOS','ISS','CRS','PES')
18#GRP4 = ('CSC','AGE','BED','FAA','HEC')
19
20ARTS = ('CRS','ISS','MUS','SOS','THA','PES','ECO','GEO')
21
22# SCS = ('BIO','HEC','MAT','ARB','ISC','IGB','YOR','HAU','ENG ','FRE','PHY ','CSC','PHE','AGE','FAA','BED','HEC')
23
24d = {}
25
26if not brain.mode.endswith('_sw'):
27    # PRENCE
28    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
29        if brain.department in GRP1:
30            d['all'] = 15370
31        elif brain.department in GRP2:
32            d['all'] = 15370
33        elif brain.department in GRP3:
34            d['all'] = 14770
35        else:
36            d['all'] = 15370
37    # new addition for prence to nce-i students whose fees are different from other nce-i students
38    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.entry_mode == 'prence':
39        if brain.department in GRP1:
40            d['all'] = 10120
41        elif brain.department in GRP2:
42            d['all'] = 10020
43        elif brain.department in GRP3:
44            d['all'] = 9520
45        else:
46            d['all'] = 10520
47    # NCE I (fresh)
48    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
49        if brain.department in GRP1:
50            d['all'] = 11620
51        elif brain.department in GRP2:
52            d['all'] = 11520
53        elif brain.department in GRP3:
54            d['all'] = 11020
55        else:
56            d['all'] = 12120
57    # NCE I repeaters
58    elif str(brain.level) in ('100','110') and brain.review_state == 'returning' and brain.verdict == 'C':
59        if brain.department in GRP1:
60            d['all'] = 10120
61        elif brain.department in GRP2:
62            d['all'] = 10020
63        elif brain.department in GRP3:
64            d['all'] = 9520
65        else:
66            d['all'] = 10520
67    # NCE II
68    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
69        if brain.department in GRP1:
70            d['all'] = 6750
71        elif brain.department in GRP2:
72            d['all'] = 6650
73        elif brain.department in GRP3:
74            d['all'] = 6150
75        else:
76            d['all'] = 7250
77    # NCE II repeaters
78    elif str(brain.level) in ('200','210') and brain.verdict == 'C':
79        if brain.department in GRP1:
80            d['all'] = 6750
81        elif brain.department in GRP2:
82            d['all'] = 6650
83        elif brain.department in GRP3:
84            d['all'] = 6150
85        else:
86            d['all'] = 7250
87    # NCE III
88    elif str(brain.level) in ('200','210','220'):
89        if brain.department in GRP1:
90            d['all'] = 8000
91        elif brain.department in GRP2:
92            d['all'] = 7400
93        elif brain.department in GRP3:
94            d['all'] = 7400
95        else:
96            d['all'] = 8000
97    # NCE III repeaters and spillover
98    elif str(brain.level) in ('300','310') and brain.verdict in ('B','C'):
99        if brain.department in GRP1:
100            d['all'] = 6750
101        elif brain.department in GRP2:
102            d['all'] = 6150
103        elif brain.department in GRP3:
104            d['all'] = 6150
105        else:
106            d['all'] = 6750           
107         
108    else:
109        d['all'] = 0
110else:
111    # all repeaters
112    if brain.verdict == 'C':
113        d['all'] = 9000
114    # NCE I
115    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
116        d['all'] = 11000
117    # NCE II       
118    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
119        d['all'] = 10000
120    # NCE III       
121    elif str(brain.level) in ('200','210','220'):
122        d['all'] = 9500
123    # NCE IV
124    elif str(brain.level) in ('300','310','320'):
125        d['all'] = 9500
126    # NCE IV spillover
127    elif str(brain.level) in ('400','410','420') and brain.verdict == 'B':
128        d['all'] = 9000       
129    else:
130        d['all'] = 0
131
132
133next_info = context.getNextInfo(brain)
134next_session_str = next_info['next_session_str']
135d['next_session_id'] = next_info['next_session_id']
136d['description'] = "School Fee for Session %s" % next_session_str
137
138return d
Note: See TracBrowser for help on using the repository browser.