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

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

see fceoyo #49

File size: 4.0 KB
RevLine 
[4547]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
[4567]15GRP1 = ('BIO','MAT','ISC','PHE','CHM','YOR','ARB','ENG','FRE','HAU','IGB')
[5522]16GRP2 = ('CSC','BED','FAA','HEC','MUS')
17#GRP3 = ('ECO','GEO','SOS','ISS','CRS','PES','THA')
[4547]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
[5520]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
[4547]42    # NCE I (fresh)
43    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
44        if brain.department in GRP1:
[5522]45            d['all'] = 12550
[4547]46        elif brain.department in GRP2:
[5522]47            d['all'] = 12550
[4547]48        else:
[5522]49            d['all'] = 11950
[4547]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:
[5522]53            d['all'] = 10050
[4547]54        elif brain.department in GRP2:
[5522]55            d['all'] = 10050
[4547]56        else:
[5522]57            d['all'] = 9450
[4547]58    # NCE II
59    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
60        if brain.department in GRP1:
[5522]61            d['all'] = 7000
[4547]62        elif brain.department in GRP2:
[5522]63            d['all'] = 8000
[4547]64        else:
[5522]65            d['all'] = 6400
[4547]66    # NCE II repeaters
67    elif str(brain.level) in ('200','210') and brain.verdict == 'C':
68        if brain.department in GRP1:
[5522]69            d['all'] = 7000
[4547]70        elif brain.department in GRP2:
[5522]71            d['all'] = 8000
[4547]72        else:
[5522]73            d['all'] = 6400
[4547]74    # NCE III
75    elif str(brain.level) in ('200','210','220'):
76        if brain.department in GRP1:
[5522]77            d['all'] = 8750
[4547]78        elif brain.department in GRP2:
[5522]79            d['all'] = 8750
[4547]80        else:
[5522]81            d['all'] = 8150
[4547]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:
[5522]85            d['all'] = 4500
[4547]86        elif brain.department in GRP2:
[5522]87            d['all'] = 4500
[4547]88        else:
[5522]89            d['all'] = 3900         
[4547]90         
91    else:
92        d['all'] = 0
[5520]93
94##sandwich fees not yet modified
[4547]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
[5522]123return d
Note: See TracBrowser for help on using the repository browser.