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

Last change on this file since 4181 was 3970, checked in by Henrik Bettermann, 16 years ago

resolve FCE Oyoy #17

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"""
14
15
16ARTS = ('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
20d = {}
21
22if 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    # new addition for prence to nce-i students whose fees are different from other nce-i students
30    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.entry_mode == 'prence':
31        if brain.department in ARTS:
32            d['all'] = 13320
33        else:
34            d['all'] = 14420
35    # NCE I (fresh)
36    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
37        if brain.department in ARTS:
38            d['all'] = 9820
39        else:
40            d['all'] = 10420
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        elif brain.department in ('SCI','VTE','LAG'):
46            d['all'] = 11720
47        elif brain.department in ('ASS','EDU'):
48            d['all'] = 11120     
49        else:
50            d['all'] = 8920
51    # NCE II
52    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
53        if brain.department in ARTS:
54            d['all'] = 5450
55        else:
56            d['all'] = 6050
57    # NCE II repeaters
58    elif str(brain.level) in ('200','210') and brain.verdict == 'C':
59        if brain.department in ARTS:
60            d['all'] = 5450
61        else:
62            d['all'] = 6050 
63    # NCE III
64    elif str(brain.level) in ('200','210','220'):
65        if brain.department in ARTS:
66            d['all'] = 6200
67        else:
68            d['all'] = 6800
69    # NCE III repeaters and spillover
70    elif str(brain.level) in ('300','310') and brain.verdict in ('B','C'):
71        if brain.department in ARTS:
72            d['all'] = 4950
73        else:
74            d['all'] = 5550           
75         
76    else:
77        d['all'] = 0
78else:
79    # all repeaters
80    if brain.verdict == 'C':
81        d['all'] = 9000
82    # NCE I
83    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
84        d['all'] = 11000
85    # NCE II       
86    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
87        d['all'] = 10000
88    # NCE III       
89    elif str(brain.level) in ('200','210','220'):
90        d['all'] = 9500
91    # NCE IV
92    elif str(brain.level) in ('300','310','320'):
93        d['all'] = 9500
94    # NCE IV spillover
95    elif str(brain.level) in ('400','410','420') and brain.verdict == 'B':
96        d['all'] = 9000       
97    else:
98        d['all'] = 0
99
100
101next_info = context.getNextInfo(brain)
102next_session_str = next_info['next_session_str']
103d['next_session_id'] = next_info['next_session_id']
104d['description'] = "School Fee for Session %s" % next_session_str
105
106return d
107
Note: See TracBrowser for help on using the repository browser.