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

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

resolve FCEOyoy #8

File size: 3.2 KB
RevLine 
[3714]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
[3812]16ARTS = ('CRS','ISS','MUS','SOS','THA','PES','ECO','GEO')
[3714]17
[3739]18# SCS = ('BIO','HEC','MAT','ARB','ISC','IGB','YOR','HAU','ENG ','FRE','PHY ','CSC','PHE','AGE','FAA','BED','HEC')
[3714]19
20d = {}
21
22if not brain.mode.endswith('_sw'):
[3760]23    # PRENCE
[3714]24    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
25        if brain.department in ARTS:
[3759]26            d['all'] = 14770
[3714]27        else:
[3759]28            d['all'] = 15370
[3844]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
[3760]35    # NCE I (fresh)
[3714]36    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
37        if brain.department in ARTS:
[3739]38            d['all'] = 9820
[3714]39        else:
[3739]40            d['all'] = 10420
[3760]41    # NCE I repeaters
42    elif str(brain.level) in ('100','110') and brain.review_state == 'returning' and brain.verdict == 'C':
[3714]43        if brain.department in ARTS:
[3759]44            d['all'] = 8320
[3714]45        else:
[3759]46            d['all'] = 8920
[3760]47    # NCE II
48    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
[3714]49        if brain.department in ARTS:
[3739]50            d['all'] = 5450
[3714]51        else:
[3739]52            d['all'] = 6050
[3760]53    # NCE II repeaters
54    elif str(brain.level) in ('200','210') and brain.verdict == 'C':
[3714]55        if brain.department in ARTS:
[3760]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:
[3739]62            d['all'] = 6200
[3714]63        else:
[3739]64            d['all'] = 6800
[3761]65    # NCE III repeaters and spillover
66    elif str(brain.level) in ('300','310') and brain.verdict in ('B','C'):
[3739]67        if brain.department in ARTS:
68            d['all'] = 4950
69        else:
[3759]70            d['all'] = 5550           
[3760]71         
[3714]72    else:
73        d['all'] = 0
74else:
[3760]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       
[3714]85    elif str(brain.level) in ('200','210','220'):
[3760]86        d['all'] = 9500
87    # NCE IV
[3714]88    elif str(brain.level) in ('300','310','320'):
[3760]89        d['all'] = 9500
[3761]90    # NCE IV spillover
91    elif str(brain.level) in ('400','410','420') and brain.verdict == 'B':
92        d['all'] = 9000       
[3714]93    else:
94        d['all'] = 0
95
96
97next_info = context.getNextInfo(brain)
98next_session_str = next_info['next_session_str']
99d['next_session_id'] = next_info['next_session_id']
100d['description'] = "School Fee for Session %s" % next_session_str
101
102return d
103
Note: See TracBrowser for help on using the repository browser.