[16639] | 1 | ## $Id: utils.py 17453 2023-06-25 06:57:37Z henrik $ |
---|
[15614] | 2 | ## |
---|
| 3 | ## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
| 18 | """Customize general helper utilities for Kofa. |
---|
| 19 | """ |
---|
| 20 | from kofacustom.nigeria.utils.utils import NigeriaKofaUtils |
---|
| 21 | |
---|
| 22 | class CustomKofaUtils(NigeriaKofaUtils): |
---|
| 23 | """A collection of methods subject to customization. |
---|
| 24 | """ |
---|
[17394] | 25 | |
---|
| 26 | DEGREES_DICT = { |
---|
| 27 | 'BA': 'Bachelor of Arts', |
---|
| 28 | 'BAGR': 'Bachelor of Agriculture', |
---|
| 29 | 'LLB': 'Bachelor of Laws', |
---|
| 30 | 'MA': 'Master of Arts', |
---|
| 31 | 'MBA': 'Master of Business Administration', |
---|
| 32 | 'MUSM': 'Master of Music', |
---|
| 33 | 'LLM': 'Master of Laws', |
---|
| 34 | 'DBA': 'Doctor of Business Administration', |
---|
| 35 | 'PHD': 'Doctor of Philosophy', |
---|
| 36 | 'MD': 'Doctor of Medicine', |
---|
| 37 | 'RN': 'Registered Nursing', |
---|
| 38 | 'RM': 'Registered Midwifery', |
---|
[17453] | 39 | 'ND': 'National Diploma Nursing', |
---|
| 40 | 'HND': 'Higher National Diploma Public Health', |
---|
[17394] | 41 | } |
---|
| 42 | |
---|
[17207] | 43 | EXAM_GRADES = ( |
---|
| 44 | ('A1', 'Excellent (A1)'), |
---|
| 45 | ('A2', 'Very Good (A2)'), |
---|
| 46 | ('A3', 'Good (A3)'), |
---|
| 47 | ('B2', 'Very Good (B2)'), |
---|
| 48 | ('B3', 'Good (B3)'), |
---|
| 49 | ('C4', 'Credit (C4)'), |
---|
| 50 | ('C5', 'Credit (C5)'), |
---|
| 51 | ('C6', 'Credit (C6)'), |
---|
[17209] | 52 | #('A', 'Pass (A)'), |
---|
| 53 | #('B', 'Pass (B)'), |
---|
| 54 | #('C', 'Pass (C)'), |
---|
[17207] | 55 | #('U', 'Pass (U)'), |
---|
| 56 | #('D7', 'Pass (D7)'), |
---|
| 57 | #('P7', 'Pass (P7)'), |
---|
| 58 | #('P8', 'Pass (P8)'), |
---|
| 59 | #('E8', 'Pass (E8)'), |
---|
| 60 | #('F9', 'Fail (F9)'), |
---|
[17209] | 61 | #('Aa', 'A (a)'), |
---|
| 62 | #('Bb', 'B (b)'), |
---|
| 63 | #('Cc', 'C (c)'), |
---|
[17207] | 64 | #('Dd', 'D (d)'), |
---|
| 65 | #('Ee', 'E (e)'), |
---|
| 66 | #('Ff', 'F (f)'), |
---|
| 67 | #('Gg', 'G (g)'), |
---|
[17209] | 68 | #('credit-1', 'Credit-1'), |
---|
| 69 | #('credit-2', 'Credit-2'), |
---|
[17207] | 70 | ('dist', 'Distinction'), |
---|
| 71 | #('pass', 'Pass'), |
---|
| 72 | #('AR', 'Awaiting Results'), |
---|
| 73 | ) |
---|
[15614] | 74 | |
---|
[16701] | 75 | PAYMENT_CATEGORIES = { |
---|
[16704] | 76 | 'schoolfee': 'School Fee (total amount)', |
---|
[17382] | 77 | 'schoolfee_1': 'School Fee (1st instalment)', |
---|
| 78 | 'secondinstal': 'School Fee (2nd instalment)', |
---|
[16712] | 79 | 'clearance': 'Acceptance Fee', |
---|
[17365] | 80 | 'hostel':'Hostel Fee (1st instalment)', |
---|
[17364] | 81 | 'hostel_2':'Hostel Fee (2nd instalment)', |
---|
[17438] | 82 | 'hostel_total':'Hostel Fee (full payment)', |
---|
[16701] | 83 | #'bed_allocation': 'Bed Allocation Fee', |
---|
| 84 | #'hostel_maintenance': 'Hostel Maintenance Fee', |
---|
| 85 | #'transfer': 'Transfer Fee', |
---|
| 86 | #'gown': 'Gown Hire Fee', |
---|
[16712] | 87 | 'application': 'Application Fee', |
---|
[16701] | 88 | #'app_balance': 'Application Fee Balance', |
---|
[17039] | 89 | 'transcript': 'Transcript Fee', |
---|
[16701] | 90 | #'late_registration': 'Late Course Registration Fee', |
---|
| 91 | #'combi': 'Combi Payment', |
---|
[17332] | 92 | 'resit': 'Resit Fee', |
---|
[16701] | 93 | } |
---|
| 94 | |
---|
[16704] | 95 | SELECTABLE_PAYMENT_CATEGORIES = { |
---|
[17031] | 96 | 'schoolfee': 'School Fee (total amount)', |
---|
[17382] | 97 | 'schoolfee_1': 'School Fee (1st instalment)', |
---|
| 98 | 'secondinstal': 'School Fee (2nd instalment)', |
---|
[17365] | 99 | 'hostel':'Hostel Fee (1st instalment)', |
---|
[17364] | 100 | 'hostel_2':'Hostel Fee (2nd instalment)', |
---|
[17438] | 101 | 'hostel_total':'Hostel Fee (full payment)', |
---|
[17332] | 102 | 'resit': 'Resit Fee', |
---|
[16704] | 103 | } |
---|
[16705] | 104 | |
---|
| 105 | def selectable_payment_categories(self, student): |
---|
| 106 | return self.SELECTABLE_PAYMENT_CATEGORIES |
---|
[16710] | 107 | |
---|
| 108 | PREVIOUS_PAYMENT_CATEGORIES = { |
---|
| 109 | 'schoolfee': 'School Fee', |
---|
[16792] | 110 | 'hostel':'Hostel Fee', |
---|
[16710] | 111 | } |
---|
| 112 | |
---|
| 113 | REPORTABLE_PAYMENT_CATEGORIES = { |
---|
| 114 | 'schoolfee': 'School Fee', |
---|
| 115 | } |
---|
| 116 | |
---|
| 117 | BALANCE_PAYMENT_CATEGORIES = { |
---|
| 118 | 'schoolfee': 'School Fee', |
---|
[16792] | 119 | 'hostel':'Hostel Fee', |
---|
[16710] | 120 | } |
---|
| 121 | |
---|
| 122 | COMBI_PAYMENT_CATEGORIES = { |
---|
| 123 | } |
---|
[17044] | 124 | |
---|
| 125 | STUDY_MODES_DICT = { |
---|
[17096] | 126 | 'ug_ft': 'Undergraduate Full Time', |
---|
[17050] | 127 | #'no': 'no application', |
---|
| 128 | 'basic_mid':'Basic Midwifery', |
---|
| 129 | 'basic_nurs':'Basic Nursing', |
---|
| 130 | 'post_mid':'Post Midwifery', |
---|
| 131 | 'post_nurs':'Post Nursing', |
---|
[17453] | 132 | 'dp_nurs':'Diploma Nursing', |
---|
| 133 | 'post_bph':'Post Basic Public Health', |
---|
| 134 | } |
---|
| 135 | |
---|
| 136 | MODE_GROUPS = { |
---|
| 137 | 'All': ('all',), |
---|
| 138 | 'Undergraduate Full-Time': ('ug_ft',), |
---|
| 139 | 'Undergraduate Part-Time': ('ug_pt',), |
---|
| 140 | 'Postgraduate Full-Time': ('pg_ft',), |
---|
| 141 | 'Postgraduate Part-Time': ('pg_pt',), |
---|
[17044] | 142 | } |
---|