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

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

resolve FCE Oyoy #17

File size: 3.3 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
[3970]45        elif brain.department in ('SCI','VTE','LAG'):
46            d['all'] = 11720
47        elif brain.department in ('ASS','EDU'):
48            d['all'] = 11120     
[3714]49        else:
[3759]50            d['all'] = 8920
[3760]51    # NCE II
52    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
[3714]53        if brain.department in ARTS:
[3739]54            d['all'] = 5450
[3714]55        else:
[3739]56            d['all'] = 6050
[3760]57    # NCE II repeaters
58    elif str(brain.level) in ('200','210') and brain.verdict == 'C':
[3714]59        if brain.department in ARTS:
[3760]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:
[3739]66            d['all'] = 6200
[3714]67        else:
[3739]68            d['all'] = 6800
[3761]69    # NCE III repeaters and spillover
70    elif str(brain.level) in ('300','310') and brain.verdict in ('B','C'):
[3739]71        if brain.department in ARTS:
72            d['all'] = 4950
73        else:
[3759]74            d['all'] = 5550           
[3760]75         
[3714]76    else:
77        d['all'] = 0
78else:
[3760]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       
[3714]89    elif str(brain.level) in ('200','210','220'):
[3760]90        d['all'] = 9500
91    # NCE IV
[3714]92    elif str(brain.level) in ('300','310','320'):
[3760]93        d['all'] = 9500
[3761]94    # NCE IV spillover
95    elif str(brain.level) in ('400','410','420') and brain.verdict == 'B':
96        d['all'] = 9000       
[3714]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.