1 | ## $Id: utils.py 17513 2023-07-24 05:56:51Z henrik $ |
---|
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 | """ |
---|
25 | |
---|
26 | APP_CATS_DICT = { |
---|
27 | 'basic': 'UAS, PUTME, PUDE, PCE, PRENCE', |
---|
28 | 'no': 'No Application', |
---|
29 | 'rnnurse': 'RN Nursing', |
---|
30 | 'ndnurse': 'ND Nursing', |
---|
31 | } |
---|
32 | |
---|
33 | DEGREES_DICT = { |
---|
34 | 'BA': 'Bachelor of Arts', |
---|
35 | 'BAGR': 'Bachelor of Agriculture', |
---|
36 | 'LLB': 'Bachelor of Laws', |
---|
37 | 'MA': 'Master of Arts', |
---|
38 | 'MBA': 'Master of Business Administration', |
---|
39 | 'MUSM': 'Master of Music', |
---|
40 | 'LLM': 'Master of Laws', |
---|
41 | 'DBA': 'Doctor of Business Administration', |
---|
42 | 'PHD': 'Doctor of Philosophy', |
---|
43 | 'MD': 'Doctor of Medicine', |
---|
44 | 'RN': 'Registered Nursing', |
---|
45 | 'RM': 'Registered Midwifery', |
---|
46 | 'ND': 'National Diploma Nursing', |
---|
47 | 'HND': 'Higher National Diploma Public Health', |
---|
48 | } |
---|
49 | |
---|
50 | EXAM_GRADES = ( |
---|
51 | ('A1', 'Excellent (A1)'), |
---|
52 | ('A2', 'Very Good (A2)'), |
---|
53 | ('A3', 'Good (A3)'), |
---|
54 | ('B2', 'Very Good (B2)'), |
---|
55 | ('B3', 'Good (B3)'), |
---|
56 | ('C4', 'Credit (C4)'), |
---|
57 | ('C5', 'Credit (C5)'), |
---|
58 | ('C6', 'Credit (C6)'), |
---|
59 | #('A', 'Pass (A)'), |
---|
60 | #('B', 'Pass (B)'), |
---|
61 | #('C', 'Pass (C)'), |
---|
62 | #('U', 'Pass (U)'), |
---|
63 | #('D7', 'Pass (D7)'), |
---|
64 | #('P7', 'Pass (P7)'), |
---|
65 | #('P8', 'Pass (P8)'), |
---|
66 | #('E8', 'Pass (E8)'), |
---|
67 | #('F9', 'Fail (F9)'), |
---|
68 | #('Aa', 'A (a)'), |
---|
69 | #('Bb', 'B (b)'), |
---|
70 | #('Cc', 'C (c)'), |
---|
71 | #('Dd', 'D (d)'), |
---|
72 | #('Ee', 'E (e)'), |
---|
73 | #('Ff', 'F (f)'), |
---|
74 | #('Gg', 'G (g)'), |
---|
75 | #('credit-1', 'Credit-1'), |
---|
76 | #('credit-2', 'Credit-2'), |
---|
77 | ('dist', 'Distinction'), |
---|
78 | #('pass', 'Pass'), |
---|
79 | #('AR', 'Awaiting Results'), |
---|
80 | ) |
---|
81 | |
---|
82 | PAYMENT_CATEGORIES = { |
---|
83 | 'schoolfee': 'School Fee (total amount)', |
---|
84 | 'schoolfee_1': 'School Fee (1st instalment)', |
---|
85 | 'secondinstal': 'School Fee (2nd instalment)', |
---|
86 | 'clearance': 'Acceptance Fee', |
---|
87 | 'hostel':'Hostel Fee (1st instalment)', |
---|
88 | 'hostel_2':'Hostel Fee (2nd instalment)', |
---|
89 | 'hostel_total':'Hostel Fee (full payment)', |
---|
90 | #'bed_allocation': 'Bed Allocation Fee', |
---|
91 | #'hostel_maintenance': 'Hostel Maintenance Fee', |
---|
92 | #'transfer': 'Transfer Fee', |
---|
93 | #'gown': 'Gown Hire Fee', |
---|
94 | 'application': 'Application Fee', |
---|
95 | #'app_balance': 'Application Fee Balance', |
---|
96 | 'transcript': 'Transcript Fee', |
---|
97 | #'late_registration': 'Late Course Registration Fee', |
---|
98 | #'combi': 'Combi Payment', |
---|
99 | 'resit': 'Resit Fee', |
---|
100 | } |
---|
101 | |
---|
102 | SELECTABLE_PAYMENT_CATEGORIES = { |
---|
103 | 'schoolfee': 'School Fee (total amount)', |
---|
104 | 'schoolfee_1': 'School Fee (1st instalment)', |
---|
105 | 'secondinstal': 'School Fee (2nd instalment)', |
---|
106 | 'hostel':'Hostel Fee (1st instalment)', |
---|
107 | 'hostel_2':'Hostel Fee (2nd instalment)', |
---|
108 | 'hostel_total':'Hostel Fee (full payment)', |
---|
109 | 'resit': 'Resit Fee', |
---|
110 | } |
---|
111 | |
---|
112 | def selectable_payment_categories(self, student): |
---|
113 | return self.SELECTABLE_PAYMENT_CATEGORIES |
---|
114 | |
---|
115 | PREVIOUS_PAYMENT_CATEGORIES = { |
---|
116 | 'schoolfee': 'School Fee', |
---|
117 | 'hostel':'Hostel Fee', |
---|
118 | } |
---|
119 | |
---|
120 | REPORTABLE_PAYMENT_CATEGORIES = { |
---|
121 | 'schoolfee': 'School Fee (total amount)', |
---|
122 | 'schoolfee_1': 'School Fee (1st instalment)', |
---|
123 | 'secondinstal': 'School Fee (2nd instalment)', |
---|
124 | 'hostel':'Hostel Fee (1st instalment)', |
---|
125 | 'hostel_2':'Hostel Fee (2nd instalment)', |
---|
126 | 'hostel_total':'Hostel Fee (full payment)', |
---|
127 | 'resit': 'Resit Fee', |
---|
128 | } |
---|
129 | |
---|
130 | BALANCE_PAYMENT_CATEGORIES = { |
---|
131 | 'schoolfee': 'School Fee', |
---|
132 | 'hostel':'Hostel Fee', |
---|
133 | } |
---|
134 | |
---|
135 | COMBI_PAYMENT_CATEGORIES = { |
---|
136 | } |
---|
137 | |
---|
138 | STUDY_MODES_DICT = { |
---|
139 | 'ug_ft': 'Undergraduate Full Time', |
---|
140 | #'no': 'no application', |
---|
141 | 'basic_mid':'Basic Midwifery', |
---|
142 | 'basic_nurs':'Basic Nursing', |
---|
143 | 'post_mid':'Post Midwifery', |
---|
144 | 'post_nurs':'Post Nursing', |
---|
145 | 'dp_nurs':'Diploma Nursing', |
---|
146 | 'post_bph':'Post Basic Public Health', |
---|
147 | } |
---|
148 | |
---|
149 | MODE_GROUPS = { |
---|
150 | 'All': ('all',), |
---|
151 | 'Undergraduate Full-Time': ('ug_ft',), |
---|
152 | 'Basic Midwifery': ('basic_mid',), |
---|
153 | 'Basic Nursing': ('basic_nurs',), |
---|
154 | 'Post Midwifery': ('post_mid',), |
---|
155 | 'Post Nursing': ('post_nurs',), |
---|
156 | } |
---|