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

Last change on this file since 6698 was 5522, checked in by Henrik Bettermann, 14 years ago

see fceoyo #49

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