## Script (Python) "getSchoolFee" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=brain=None ##title= ## # $Id: getSchoolFee.py 2153 2007-08-23 12:57:22Z henrik $ """ return SchoolFee """ fee1 = ("ART", "SSC", "LAW", "EDU", ) session_fees = {'99': ('22200','23700'), '00': ('22200','23700'), '01': ('22200','23700'), '02': ('22200','23700'), '03': ('22200','23700'), '04': ('22200','23700'), '05': ('22200','23700'), '06': ('22200','23700'), } pt_fees = { "DIF": {'new': "32200", 'returning': "17700", 'description': 'Diploma in French'}, "DTA": {'new':"34200", 'returning':"19700", 'description': 'Diploma in Theatre Arts'}, "DISD": {'new':"42200", 'returning':"27700", 'description': 'Diploma in International Studies'}, "DFA": {'new':"34200", 'returning':"19700", 'description': 'Diploma in Fine & Applied Arts'}, "DAE": {'new':"41700", 'returning':"25700", 'description': 'Diploma in Agric Economics'}, "DFS": {'new':"38700", 'returning':"22700", 'description': 'Diploma in Fishery, Forestry & Wild Life'}, "DFBS": {'new':"38700", 'returning':"22700", 'description': 'Diploma in Food & Breweries'}, "DIA": {'new':"42200", 'returning':"27700", 'description': 'Diploma in Accounting'}, "DBF": {'new':"42200", 'returning':"27700", 'description': 'Diploma in Banking & Finance'}, "DAIC": {'new':"38700", 'returning':"22700", 'description': 'Diploma in Applied Industrial Chemistry'}, "DAM": {'new':"38700", 'returning':"22700", 'description': 'Diploma in Applied Microbiology'}, "DIG": {'new':"41700", 'returning':"25700", 'description': 'Diploma in Geology'}, "DSLT": {'new':"41700", 'returning':"25700", 'description': 'Diploma in Science Laboratory Technology'}, "DICE": {'new':"43700", 'returning':"27700", 'description': 'Diploma in Computer Engineering'}, "DICHE": {'new':"43700", 'returning':"27700", 'description': 'Diploma in Chemical Engineering'}, "DDP": {'new':"43700", 'returning':"27700", 'description': 'Diploma in Data Processing'}, "DCG": {'new':"34200", 'returning':"19700", 'description': 'Diploma in Cartography'}, "DSW": {'new':"40200", 'returning':"25700", 'description': 'Diploma in Social Works'}, "DIL": {'new':"42200", 'returning':"27700", 'description': 'Diploma in Law'}, "DHT": {'new':"42200", 'returning':"27700", 'description': 'Diploma in Recreation, Hotel & Tourism Mgt.'}, "DEC": {'new':"36200", 'returning':"21200", 'description': 'Certificate in Early Child Health & Dev.'}, "DLS": {'new':"37200", 'returning':"24200", 'description': 'Diploma in Library & Information Science'}, "BFA": {'new':"42200", 'returning':"27700", 'description': 'Bachelor in Fine & Applied Arts'}, "BTA": {'new':"42200", 'returning':"27700", 'description': 'Bachelor in Theatre Arts'}, "BEL": {'new':"42200", 'returning':"27700", 'description': 'Bachelor in English'}, "BFR": {'new':"42200", 'returning':"27700", 'description': 'Bachelor in French'}, "BISD": {'new':"42200", 'returning':"27700", 'description': 'Bachelor in International Std. & Diplomacy'}, "BAE": {'new':"48700", 'returning':"32700", 'description': 'Bachelor in Agric Econs'}, "BAN": {'new':"43700", 'returning':"27700", 'description': 'Bachelor in Animal Science'}, "BAC": {'new':"43700", 'returning':"27700", 'description': 'Bachelor in Crop Science'}, "BAS": {'new':"43700", 'returning':"27700", 'description': 'Bachelor in Soil Science'}, "BIA": {'new':"47200", 'returning':"32700", 'description': 'Bachelor in Accounting'}, "BBF": {'new':"47200", 'returning':"32700", 'description': 'Bachelor in Banking & Finance'}, "BLG": {'new':"37200", 'returning':"22700", 'description': 'Bachelor in Local Goverment'}, "BPA": {'new':"47200", 'returning':"32700", 'description': 'Bachelor in Public Admin'}, "BSW": {'new':"42200", 'returning':"27700", 'description': 'Bachelor in Social Works'}, "BES": {'new':"43700", 'returning':"27700", 'description': 'Bachelor in Environmental Science'}, "BSLT": {'new':"43700", 'returning':"27700", 'description': 'Bachelor in Science Lab Technology'}, "BIP": {'new':"43700", 'returning':"27700", 'description': 'Bachelor in Industrial Physics'}, "BSCS": {'new':"45700", 'returning':"29700", 'description': 'Bachelor in Statistics with Computer'}, "LLBPT": {'new':"47200", 'returning':"32700", 'description': 'Bachelor in Law'}, "ODPT": {'new':"58700", 'returning':"42700", 'description': 'Doctor of Optometry'}, "PHARMD": {'new':"58700", 'returning':"44700", 'description': 'Doctor of Pharmacy'}, "BEEL": {'new':"38700", 'returning':"32700", 'description': 'Bachelor in Electrical/Electronics'}, "BECE": {'new':"38700", 'returning':"32700", 'description': 'Bachelor in Chemical Engineering'}, "BECO": {'new':"38700", 'returning':"32700", 'description': 'Bachelor in Computer Engineering'}, "BPRE": {'new':"38700", 'returning':"32700", 'description': 'Bachelor in Production Engineering'}, "BEPE": {'new':"38700", 'returning':"32700", 'description': 'Bachelor in Petroleum Engineering'}, "BECV": {'new':"38700", 'returning':"32700", 'description': 'Bachelor in Civil Engineering'}, } #sessionstring = "School Fee for Session %s" % context.portal_vocabularies.sessions.get(session) # sessionstring = "School Fee for Session %s" % context.sessions_voc(key=session) # fee_1_data = ("22200",sessionstring) # fee_2_data = ("23700",sessionstring) # if faculty in fee1: # return fee_1_data # return fee_2_data d = {} if brain.mode.endswith('_ft'): f = 1 if brain.faculty in fee1: f = 0 d['new'] = session_fees[brain.session][f] d['returning'] = 'not set' d['description'] = "School Fee for Session %s" % context.sessions_voc(key=brain.session) if pt_fees.has_key(brain.course): d = pt_fees[brain.course] d['description'] = "School Fee for Session %s, %s" % (context.sessions_voc(key=brain.session), d['description']) return d