[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 | """ |
---|
| 12 | return SchoolFee |
---|
| 13 | """ |
---|
| 14 | |
---|
| 15 | |
---|
[3739] | 16 | ARTS = ('CRS','ISS','MUS','SOS','THA','PES') |
---|
[3714] | 17 | |
---|
[3739] | 18 | # SCS = ('BIO','HEC','MAT','ARB','ISC','IGB','YOR','HAU','ENG ','FRE','PHY ','CSC','PHE','AGE','FAA','BED','HEC') |
---|
[3714] | 19 | |
---|
| 20 | d = {} |
---|
| 21 | |
---|
| 22 | if not brain.mode.endswith('_sw'): |
---|
| 23 | if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated': |
---|
| 24 | if brain.department in ARTS: |
---|
[3739] | 25 | d['all'] = 16950 |
---|
[3714] | 26 | else: |
---|
[3739] | 27 | d['all'] = 17550 |
---|
[3714] | 28 | elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated': |
---|
| 29 | if brain.department in ARTS: |
---|
[3739] | 30 | d['all'] = 9820 |
---|
[3714] | 31 | else: |
---|
[3739] | 32 | d['all'] = 10420 |
---|
[3714] | 33 | elif str(brain.level) == '100' and brain.review_state == 'returning': |
---|
| 34 | if brain.department in ARTS: |
---|
[3739] | 35 | d['all'] = 7820 |
---|
[3714] | 36 | else: |
---|
[3739] | 37 | d['all'] = 8420 |
---|
[3714] | 38 | elif str(brain.level) in ('200','210','220'): |
---|
| 39 | if brain.department in ARTS: |
---|
[3739] | 40 | d['all'] = 5450 |
---|
[3714] | 41 | else: |
---|
[3739] | 42 | d['all'] = 6050 |
---|
[3714] | 43 | # repeaters = spillover |
---|
[3739] | 44 | elif str(brain.level) == '300': |
---|
[3714] | 45 | if brain.department in ARTS: |
---|
[3739] | 46 | d['all'] = 6200 |
---|
[3714] | 47 | else: |
---|
[3739] | 48 | d['all'] = 6800 |
---|
| 49 | elif str(brain.level) in ('310','320'): |
---|
| 50 | if brain.department in ARTS: |
---|
| 51 | d['all'] = 4950 |
---|
| 52 | else: |
---|
| 53 | d['all'] = 6800 |
---|
[3714] | 54 | else: |
---|
| 55 | d['all'] = 0 |
---|
| 56 | else: |
---|
| 57 | if str(brain.level) == '100' and brain.review_state == 'cleared_and_validated': |
---|
| 58 | if brain.department in ARTS: |
---|
[3739] | 59 | d['all'] = 11000 |
---|
[3714] | 60 | else: |
---|
[3739] | 61 | d['all'] = 11000 |
---|
[3714] | 62 | elif str(brain.level) == '100' and brain.review_state == 'returning': |
---|
| 63 | if brain.department in ARTS: |
---|
[3739] | 64 | d['all'] = 11000 |
---|
[3714] | 65 | else: |
---|
[3739] | 66 | d['all'] = 11000 |
---|
[3714] | 67 | elif str(brain.level) in ('200','210','220'): |
---|
| 68 | if brain.department in ARTS: |
---|
[3739] | 69 | d['all'] = 10000 |
---|
[3714] | 70 | else: |
---|
[3739] | 71 | d['all'] = 10000 |
---|
[3714] | 72 | elif str(brain.level) in ('300','310','320'): |
---|
| 73 | if brain.department in ARTS: |
---|
[3739] | 74 | d['all'] = 9500 |
---|
[3714] | 75 | else: |
---|
[3739] | 76 | d['all'] = 9500 |
---|
[3714] | 77 | |
---|
[3739] | 78 | # repeaters = spillover |
---|
[3714] | 79 | elif str(brain.level) in ('400','410','420'): |
---|
| 80 | if brain.department in ARTS: |
---|
[3739] | 81 | d['all'] = 9000 |
---|
[3714] | 82 | else: |
---|
[3739] | 83 | d['all'] = 9000 |
---|
[3714] | 84 | |
---|
| 85 | else: |
---|
| 86 | d['all'] = 0 |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | next_info = context.getNextInfo(brain) |
---|
| 90 | next_session_str = next_info['next_session_str'] |
---|
| 91 | d['next_session_id'] = next_info['next_session_id'] |
---|
| 92 | d['description'] = "School Fee for Session %s" % next_session_str |
---|
| 93 | |
---|
| 94 | return d |
---|
| 95 | |
---|