1 | ## $Id: utils.py 16341 2020-12-04 07:13:06Z 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 copy import deepcopy |
---|
21 | from kofacustom.nigeria.utils.utils import NigeriaKofaUtils |
---|
22 | |
---|
23 | class CustomKofaUtils(NigeriaKofaUtils): |
---|
24 | """A collection of methods subject to customization. |
---|
25 | """ |
---|
26 | |
---|
27 | APP_CATS_DICT = { |
---|
28 | 'basic': 'Basic Application', |
---|
29 | 'no': 'no application', |
---|
30 | 'ft': 'Full Time Courses', |
---|
31 | 'pt': 'Part Time Courses', |
---|
32 | 'pre': 'Pre-Degree Studies', |
---|
33 | 'ct': 'Certificate Programmes', |
---|
34 | 'ndft': 'National Diploma Full-Time Programmes', |
---|
35 | 'ndpt': 'National Diploma Part-Time Programmes', |
---|
36 | 'ndwe': 'National Diploma Weekend Programmes', |
---|
37 | 'nde': 'National Diploma Part-Time Evening Programmes', |
---|
38 | 'hndft': 'Higher National Diploma Full-Time Programmes', |
---|
39 | 'hndpt': 'Higher National Diploma Part-Time Programmes', |
---|
40 | 'hndwe': 'Higher National Diploma Weekend Programmes', |
---|
41 | 'hnde': 'Higher National Diploma Part-Time Evening Programmes', |
---|
42 | |
---|
43 | } |
---|
44 | |
---|
45 | PAYMENT_CATEGORIES = { |
---|
46 | 'schoolfee': 'Tuition/Exams Fee', |
---|
47 | 'clearance': 'Acceptance Fee', |
---|
48 | 'bed_allocation': 'Accommodation Booking Fee', |
---|
49 | 'hostel_maintenance': 'Hostel Maintenance Fee', |
---|
50 | 'application': 'Application Fee', |
---|
51 | 'ict_entre': 'ICT and Entrepreneur Fee', |
---|
52 | 'logbook_combo': 'Logbook Combo Fee', |
---|
53 | 'siwess_combo': 'SIWESS Combo Fee', |
---|
54 | 'transcript': 'Transcript Fee', |
---|
55 | 'certificate': 'Certificate Fee', |
---|
56 | 'certificate_confirm': 'Certificate Confirmation Fee', |
---|
57 | 'late_registration': 'Late Course Registration Fee', |
---|
58 | 'final_clearance': 'Final Clearance Fee', |
---|
59 | 'union': 'Student Union Dues', |
---|
60 | 'admission_checking': 'Admission Checking Fee', |
---|
61 | 'medical': 'Medical Laboratory Test Fee', |
---|
62 | 'conv_nd': 'ND Convocation Fee', |
---|
63 | 'conv_hnd': 'HND Convocation Fee', |
---|
64 | 'nhis': 'TISHIP Fee', |
---|
65 | 'coc': 'Change of Course Fee', |
---|
66 | 'damages': 'Damages Fee', |
---|
67 | 'project_bind': 'Project Binding Fee', |
---|
68 | 'maintenance':'Maintenance and Utility Fees', |
---|
69 | } |
---|
70 | |
---|
71 | SELECTABLE_PAYMENT_CATEGORIES = { |
---|
72 | 'schoolfee': 'Tuition/Exams Fee', |
---|
73 | 'clearance': 'Acceptance Fee', |
---|
74 | 'bed_allocation': 'Accommodation Booking Fee', |
---|
75 | 'hostel_maintenance': 'Hostel Maintenance Fee', |
---|
76 | 'application': 'Application Fee', |
---|
77 | 'ict_entre': 'ICT and Entrepreneur Fee', |
---|
78 | 'logbook_combo': 'Logbook Combo Fee', |
---|
79 | 'siwess_combo': 'SIWESS Combo Fee', |
---|
80 | 'transcript': 'Transcript Fee', |
---|
81 | 'certificate': 'Certificate Fee', |
---|
82 | 'certificate_confirm': 'Certificate Confirmation Fee', |
---|
83 | 'late_registration': 'Late Course Registration Fee', |
---|
84 | 'final_clearance': 'Final Clearance Fee', |
---|
85 | 'union': 'Student Union Dues', |
---|
86 | 'admission_checking': 'Admission Checking Fee', |
---|
87 | 'medical': 'Medical Laboratory Test Fee', |
---|
88 | 'conv_nd': 'ND Convocation Fee', |
---|
89 | 'conv_hnd': 'HND Convocation Fee', |
---|
90 | 'nhis': 'TISHIP Fee', |
---|
91 | 'coc': 'Change of Course Fee', |
---|
92 | 'damages': 'Damages Fee', |
---|
93 | 'project_bind': 'Project Binding Fee', |
---|
94 | 'maintenance':'Maintenance and Utility Fees', |
---|
95 | } |
---|
96 | |
---|
97 | def selectable_payment_categories(self, student): |
---|
98 | spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES) |
---|
99 | if not student.is_fresh: |
---|
100 | del spc['application'] |
---|
101 | del spc['admission_checking'] |
---|
102 | del spc['clearance'] |
---|
103 | return spc |
---|
104 | |
---|
105 | PREVIOUS_PAYMENT_CATEGORIES = deepcopy(SELECTABLE_PAYMENT_CATEGORIES) |
---|
106 | |
---|
107 | BALANCE_PAYMENT_CATEGORIES = { |
---|
108 | 'schoolfee': 'Tuition/Exams Fee', |
---|
109 | 'ict_entre': 'ICT and Entrepreneur Fee', |
---|
110 | 'certificate_confirm': 'Certificate Confirmation Fee', |
---|
111 | 'final_clearance': 'Final Clearance Fee', |
---|
112 | } |
---|
113 | |
---|
114 | REPORTABLE_PAYMENT_CATEGORIES = { |
---|
115 | 'schoolfee': 'Tuition Exams Fee', |
---|
116 | 'clearance': 'Accept. Fee', |
---|
117 | 'hostel_maintenance': 'Hostel Maint. Fee', |
---|
118 | 'ict_entre': 'ICT Entrepr. Fee', |
---|
119 | 'logbook_combo': 'Logbook Combo Fee', |
---|
120 | 'siwess_combo': 'SIWESS Combo Fee', |
---|
121 | 'certificate': 'Cert. Fee', |
---|
122 | 'certificate_confirm': 'Cert. Confirm. Fee', |
---|
123 | 'late_registration': 'Late Course Registr. Fee', |
---|
124 | 'final_clearance': 'Final Clearance Fee', |
---|
125 | 'union': 'Student Union Dues', |
---|
126 | 'medical': 'Medical Laboratory Test Fee', |
---|
127 | } |
---|
128 | |
---|
129 | SPECIAL_APP_DICT = { |
---|
130 | 'conv_nd': 'Convocation ND', |
---|
131 | 'conv_hnd': 'Convocation HND', |
---|
132 | } |
---|
133 | |
---|
134 | STUDY_MODES_DICT = { |
---|
135 | 'ug_ft': 'Undergraduate Full Time (not used in EdoPoly)', |
---|
136 | 'nd_ft': 'National Diploma Full-Time', |
---|
137 | 'nd_pt': 'National Diploma Part-Time', |
---|
138 | 'nd_we': 'National Diploma Weekend', |
---|
139 | 'hnd_ft': 'Higher National Diploma Full-Time', |
---|
140 | 'hnd_pt': 'Higher National Diploma Part-Time', |
---|
141 | 'hnd_we': 'Higher National Diploma Weekend', |
---|
142 | 'ct': 'Certificate', |
---|
143 | 'pre': 'Pre-Degree', |
---|
144 | 'transfer': 'Transfer', |
---|
145 | 'no': 'no application', |
---|
146 | } |
---|
147 | |
---|
148 | MODE_GROUPS = { |
---|
149 | 'All': ('all',), |
---|
150 | 'Undergraduate Full-Time': ('hnd_ft', 'nd_ft'), |
---|
151 | 'Undergraduate Part-Time': ('hnd_pt', 'nd_pt'), |
---|
152 | #'Postgraduate Full-Time': ('pg_ft',), |
---|
153 | #'Postgraduate Part-Time': ('pg_pt',), |
---|
154 | } |
---|