[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 | """
|
---|
| 12 | return SchoolFee
|
---|
| 13 | """
|
---|
| 14 |
|
---|
[4567] | 15 | GRP1 = ('BIO','MAT','ISC','PHE','CHM','YOR','ARB','ENG','FRE','HAU','IGB')
|
---|
[5520] | 16 | GRP2 = ('THA','CSC','BED','FAA','HEC','MUS')
|
---|
| 17 | GRP3 = ('ECO','GEO','SOS','ISS','CRS','PES','THA')
|
---|
[4547] | 18 | #GRP4 = ('CSC','AGE','BED','FAA','HEC')
|
---|
| 19 |
|
---|
| 20 | ARTS = ('CRS','ISS','MUS','SOS','THA','PES','ECO','GEO')
|
---|
| 21 |
|
---|
| 22 | # SCS = ('BIO','HEC','MAT','ARB','ISC','IGB','YOR','HAU','ENG ','FRE','PHY ','CSC','PHE','AGE','FAA','BED','HEC')
|
---|
| 23 |
|
---|
| 24 | d = {}
|
---|
| 25 |
|
---|
| 26 | if not brain.mode.endswith('_sw'):
|
---|
| 27 | # PRENCE
|
---|
| 28 | if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
|
---|
| 29 | if brain.department in GRP1:
|
---|
| 30 | d['all'] = 15370
|
---|
| 31 | elif brain.department in GRP2:
|
---|
| 32 | d['all'] = 15370
|
---|
| 33 | elif brain.department in GRP3:
|
---|
| 34 | d['all'] = 14770
|
---|
| 35 | else:
|
---|
| 36 | d['all'] = 15370
|
---|
[5520] | 37 | # new addition for prence to nce-i students whose fees are different from other nce-i students. This is now redundant!
|
---|
| 38 | #elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.entry_mode == 'prence':
|
---|
| 39 | # if brain.department in GRP1:
|
---|
| 40 | # d['all'] = 10120
|
---|
| 41 | # elif brain.department in GRP2:
|
---|
| 42 | # d['all'] = 10020
|
---|
| 43 | # elif brain.department in GRP3:
|
---|
| 44 | # d['all'] = 9520
|
---|
| 45 | # else:
|
---|
| 46 | # d['all'] = 10520
|
---|
[4547] | 47 | # NCE I (fresh)
|
---|
| 48 | elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
|
---|
| 49 | if brain.department in GRP1:
|
---|
[5520] | 50 | d['all'] = 15050
|
---|
[4547] | 51 | elif brain.department in GRP2:
|
---|
[5520] | 52 | d['all'] = 15050
|
---|
[4547] | 53 | elif brain.department in GRP3:
|
---|
[5520] | 54 | d['all'] = 14450
|
---|
[4547] | 55 | else:
|
---|
[5520] | 56 | d['all'] = 15050
|
---|
[4547] | 57 | # NCE I repeaters
|
---|
| 58 | elif str(brain.level) in ('100','110') and brain.review_state == 'returning' and brain.verdict == 'C':
|
---|
| 59 | if brain.department in GRP1:
|
---|
[5520] | 60 | d['all'] = 12550
|
---|
[4547] | 61 | elif brain.department in GRP2:
|
---|
[5520] | 62 | d['all'] = 12550
|
---|
[4547] | 63 | elif brain.department in GRP3:
|
---|
[5520] | 64 | d['all'] = 11950
|
---|
[4547] | 65 | else:
|
---|
[5520] | 66 | d['all'] = 12550
|
---|
[4547] | 67 | # NCE II
|
---|
| 68 | elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
|
---|
| 69 | if brain.department in GRP1:
|
---|
[5520] | 70 | d['all'] = 9500
|
---|
[4547] | 71 | elif brain.department in GRP2:
|
---|
[5520] | 72 | d['all'] = 10500
|
---|
[4547] | 73 | elif brain.department in GRP3:
|
---|
[5520] | 74 | d['all'] = 8900
|
---|
[4547] | 75 | else:
|
---|
[5520] | 76 | d['all'] = 10500
|
---|
[4547] | 77 | # NCE II repeaters
|
---|
| 78 | elif str(brain.level) in ('200','210') and brain.verdict == 'C':
|
---|
| 79 | if brain.department in GRP1:
|
---|
[5520] | 80 | d['all'] = 9500
|
---|
[4547] | 81 | elif brain.department in GRP2:
|
---|
[5520] | 82 | d['all'] = 10500
|
---|
[4547] | 83 | elif brain.department in GRP3:
|
---|
[5520] | 84 | d['all'] = 8900
|
---|
[4547] | 85 | else:
|
---|
[5520] | 86 | d['all'] = 10500
|
---|
[4547] | 87 | # NCE III
|
---|
| 88 | elif str(brain.level) in ('200','210','220'):
|
---|
| 89 | if brain.department in GRP1:
|
---|
[5520] | 90 | d['all'] = 11250
|
---|
[4547] | 91 | elif brain.department in GRP2:
|
---|
[5520] | 92 | d['all'] = 11250
|
---|
[4547] | 93 | elif brain.department in GRP3:
|
---|
[5520] | 94 | d['all'] = 10650
|
---|
[4547] | 95 | else:
|
---|
[5520] | 96 | d['all'] = 11250
|
---|
[4547] | 97 | # NCE III repeaters and spillover
|
---|
| 98 | elif str(brain.level) in ('300','310') and brain.verdict in ('B','C'):
|
---|
| 99 | if brain.department in GRP1:
|
---|
[5520] | 100 | d['all'] = 7000
|
---|
[4547] | 101 | elif brain.department in GRP2:
|
---|
[5520] | 102 | d['all'] = 7000
|
---|
[4547] | 103 | elif brain.department in GRP3:
|
---|
[5520] | 104 | d['all'] = 6400
|
---|
[4547] | 105 | else:
|
---|
[5520] | 106 | d['all'] = 7000
|
---|
[4547] | 107 |
|
---|
| 108 | else:
|
---|
| 109 | d['all'] = 0
|
---|
[5520] | 110 |
|
---|
| 111 | ##sandwich fees not yet modified
|
---|
[4547] | 112 | else:
|
---|
| 113 | # all repeaters
|
---|
| 114 | if brain.verdict == 'C':
|
---|
| 115 | d['all'] = 9000
|
---|
| 116 | # NCE I
|
---|
| 117 | elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
|
---|
| 118 | d['all'] = 11000
|
---|
| 119 | # NCE II
|
---|
| 120 | elif str(brain.level) in ('100','110','120') and brain.review_state == 'returning':
|
---|
| 121 | d['all'] = 10000
|
---|
| 122 | # NCE III
|
---|
| 123 | elif str(brain.level) in ('200','210','220'):
|
---|
| 124 | d['all'] = 9500
|
---|
| 125 | # NCE IV
|
---|
| 126 | elif str(brain.level) in ('300','310','320'):
|
---|
| 127 | d['all'] = 9500
|
---|
| 128 | # NCE IV spillover
|
---|
| 129 | elif str(brain.level) in ('400','410','420') and brain.verdict == 'B':
|
---|
| 130 | d['all'] = 9000
|
---|
| 131 | else:
|
---|
| 132 | d['all'] = 0
|
---|
| 133 |
|
---|
| 134 |
|
---|
| 135 | next_info = context.getNextInfo(brain)
|
---|
| 136 | next_session_str = next_info['next_session_str']
|
---|
| 137 | d['next_session_id'] = next_info['next_session_id']
|
---|
| 138 | d['description'] = "School Fee for Session %s" % next_session_str
|
---|
| 139 |
|
---|
| 140 | return d
|
---|