source: WAeUP_SRP/trunk/skins/waeup_fceokene/getSchoolFee.py @ 5324

Last change on this file since 5324 was 4862, checked in by Henrik Bettermann, 15 years ago

enable payment for second spillover year students

File size: 3.8 KB
RevLine 
[3759]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
[4536]16ARTS = ('CRS','ISS','HIS','MUS','ECO','GEO','POL','SOS','CCA','ECU','THA','GED','GSE','PES','SPC','ENG ','FRE','ARB','HAU','IGB','YOR')
[3759]17
[4536]18# SCS = ('BIO','CHE','HED','MAT','PED','PHY ','CSC','ISC','PHE','AGE','BED','HEC','TED','FAA')
[3759]19
20d = {}
21
22if not brain.mode.endswith('_sw'):
[3760]23    # PRENCE
[3759]24    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
25        if brain.department in ARTS:
[4551]26            d['all'] = 14900
[3759]27        else:
[4551]28            d['all'] = 15400
[3760]29    # all repeaters
[3802]30    #elif brain.verdict == 'C':
31    #    if brain.department in ARTS:
[4551]32    #        d['all'] = 9170
[3802]33    #    else:
[4551]34    #        d['all'] = 9645
[3760]35    # NCE I fresh
[3759]36    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
37        if brain.department in ARTS:
[4551]38            d['all'] = 12020
[3759]39        else:
[4551]40            d['all'] = 12495
[3760]41    # NCE II
42    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
[3759]43        if brain.department in ARTS:
[4551]44            d['all'] = 11070
[3759]45        else:
[4551]46            d['all'] = 11545
[3760]47    # NCE III
[3759]48    elif str(brain.level) in ('200','210','220'):
49        if brain.department in ARTS:
[4551]50            d['all'] = 11070
[3759]51        else:
[4551]52            d['all'] = 11545
[3761]53    # NCE III spillover
54    elif str(brain.level) in ('300','310','320') and brain.verdict == 'B':
55        if brain.department in ARTS:
[4551]56            d['all'] = 9170
[3761]57        else:
[4862]58            d['all'] = 9645       
59    # NCE III second spillover
60    elif str(brain.level) in ('400','410','420') and brain.verdict == 'B':
61        if brain.department in ARTS:
62            d['all'] = 9170
63        else:
64            d['all'] = 9645                   
[3759]65    else:
[3760]66        d['all'] = 0   
67
[3759]68else:
69    if str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
70        if brain.department in ARTS:
[4551]71            d['all'] = 20900
[3759]72        else:
[4551]73            d['all'] = 21400
[3760]74    # all repeaters
[3888]75    elif brain.verdict == 'C':
[3759]76        if brain.department in ARTS:
[4551]77            d['all'] = 15900
[3760]78        else:
[4551]79            d['all'] = 16400
[3760]80    # NCE II           
81    elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
82        if brain.department in ARTS:
[4551]83            d['all'] = 17400
[3759]84        else:
[4551]85            d['all'] = 17900
[3760]86    # NCE III
[3759]87    elif str(brain.level) in ('200','210','220'):
88        if brain.department in ARTS:
[4551]89            d['all'] = 19400
[3759]90        else:
[4551]91            d['all'] = 19900
[3760]92    # NCE IV
[3759]93    elif str(brain.level) in ('300','310','320'):
94        if brain.department in ARTS:
[4551]95            d['all'] = 17400
[3759]96        else:
[4551]97            d['all'] = 17900
[3760]98    # NCE V
[3759]99    elif str(brain.level) in ('400','410','420'):
100        if brain.department in ARTS:
[4551]101            d['all'] = 17400
[3759]102        else:
[4551]103            d['all'] = 17900
[3761]104    # NCE V spillover
105    elif str(brain.level) in ('500','510','520') and brain.verdict == 'B':
106        if brain.department in ARTS:
[4551]107            d['all'] = 15900
[3761]108        else:
[4862]109            d['all'] = 16400         
110    # NCE V second spillover
111    elif str(brain.level) in ('600','610','620') and brain.verdict == 'B':
112        if brain.department in ARTS:
113            d['all'] = 15900
114        else:
115            d['all'] = 16400                   
[3759]116    else:
[3761]117        d['all'] = 0               
[3759]118
119
[3761]120
[3759]121next_info = context.getNextInfo(brain)
122next_session_str = next_info['next_session_str']
123d['next_session_id'] = next_info['next_session_id']
124d['description'] = "School Fee for Session %s" % next_session_str
125
126return d
Note: See TracBrowser for help on using the repository browser.