source: main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py @ 14338

Last change on this file since 14338 was 14338, checked in by Henrik Bettermann, 8 years ago

Add IJMB application type and bank account.

  • Property svn:keywords set to Id
File size: 8.6 KB
Line 
1## $Id: utils.py 14338 2016-12-13 17:49:34Z 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
21import string
22from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
23
24class CustomKofaUtils(NigeriaKofaUtils):
25    """A collection of methods subject to customization.
26    """
27
28    PREFERRED_LANGUAGES_DICT = {
29        }
30
31    PAYMENT_CATEGORIES = {
32        'schoolfee': 'School Fee',
33        'schoolfee_1': 'School Fee Plus (1st instalment)',
34        'schoolfee_2': 'School Fee (2nd instalment)',
35        'schoolfee_incl': 'School Fee Plus',
36        'clearance': 'Acceptance Fee',
37        'clearance_incl': 'Acceptance Fee Plus',
38        'hostel_maintenance': 'Hostel Accommodation Fee',
39        'application': 'Application Fee',
40        'bed_allocation': 'Bed Allocation Fee',
41        'transfer': 'Transfer Fee',
42        'transcript_local': 'Local Transcript Fee',
43        'transcript_inter': 'International Transcript Fee',
44        'late_registration': 'Late Course Registration Fee',
45        'welfare': 'Student Welfare Assurance Fee',
46        'union': 'Student Union Dues',
47        'lapel': 'Lapel/File Fee',
48        'matric_gown': 'Matriculation Gown Fee',
49        'concessional': 'Concessional Fee',
50        'id_card': 'Student ID Card',
51        'gst_text_book_1': 'Text Book Fee GST101 GST102',
52        'gst_text_book_2': 'Text Book Fee GST111 GST112',
53        'gst_text_book_3': 'Text Book Fee GST222',
54        'ent_text_book_4': 'Text Book Fee ENT201',
55        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
56        'gst_registration_2': 'Registration Fee GST222',
57        'ent_registration_3': 'Registration Fee ENT201',
58        'fac_dep': 'Faculty and Departmental Dues',
59        }
60
61    SELECTABLE_PAYMENT_CATEGORIES = {
62        'schoolfee': 'School Fee without additional fees',
63        'schoolfee_1': 'School Fee (1st instalment) + Student Union Dues + Welfare Assurance Fee',
64        'schoolfee_2': 'School Fee (2nd instalment)',
65        'schoolfee_incl': 'School Fee + Student Union Dues + Welfare Assurance Fee',
66        'clearance': 'Acceptance Fee without additional fees',
67        'clearance_incl': 'Acceptance Fee + Matric Gown Fee + Lapel/File Fee',
68        'hostel_maintenance': 'Hostel Accommodation Fee',
69        #'application': 'Application Fee',
70        #'bed_allocation': 'Bed Allocation Fee',
71        #'transfer': 'Transfer Fee',
72        'transcript_local': 'Local Transcript Fee',
73        'transcript_inter': 'International Transcript Fee',
74        'late_registration': 'Late Course Registration Fee',
75        #'welfare': 'Student Welfare Assurance Fee',
76        #'union': 'Student Union Dues',
77        #'lapel': 'Lapel/File Fee',
78        #'matric_gown': 'Matriculation Gown Fee',
79        'concessional': 'Concessional Fee',
80        #'id_card': 'Student ID Card',
81        'gst_text_book_1': 'Text Book Fee GST101 GST102',
82        'gst_text_book_2': 'Text Book Fee GST111 GST112',
83        'gst_text_book_3': 'Text Book Fee GST222',
84        'ent_text_book_4': 'Text Book Fee ENT201',
85        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
86        'gst_registration_2': 'Registration Fee GST222',
87        'ent_registration_3': 'Registration Fee ENT201',
88        'fac_dep': 'Faculty and Departmental Dues',
89        }
90
91    REPORTABLE_PAYMENT_CATEGORIES = {
92        'schoolfee': 'School Fee',
93        'schoolfee_incl': 'School Fee Plus',
94        'schoolfee_1': 'School Fee 1 Plus',
95        'schoolfee_2': 'School Fee 2',
96        'clearance': 'Acceptance Fee',
97        'clearance_incl': 'Acceptance Fee Plus',
98        'hostel_maintenance': 'Hostel Maintenance Fee',
99        }
100
101    BALANCE_PAYMENT_CATEGORIES = {
102        'schoolfee': 'School Fee',
103        'clearance': 'Acceptance Fee',
104        'hostel_maintenance': 'Hostel Maintenance Fee',
105        'late_registration': 'Late Course Registration Fee',
106        'welfare': 'Student Welfare Assurance Fee',
107        'union': 'Student Union Dues',
108        'lapel': 'Lapel/File Fee',
109        'matric_gown': 'Matriculation Gown Fee',
110        'id_card': 'Student ID Card',
111        'gst_text_book_1': 'Text Book Fee GST101 GST102',
112        'gst_text_book_2': 'Text Book Fee GST111 GST112',
113        'gst_text_book_3': 'Text Book Fee GST222',
114        'ent_text_book_4': 'Text Book Fee ENT201',
115        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
116        'gst_registration_2': 'Registration Fee GST222',
117        'ent_registration_3': 'Registration Fee ENT201',
118        'fac_dep': 'Faculty and Departmental Dues',
119        }
120
121    APP_CATS_DICT = {
122        'basic': 'PUTME, PUDE, PCE, PRENCE',
123        'no': 'No Application',
124        'pg_ft': 'Postgraduate Full-Time',
125        'pg_pt': 'Postgraduate Part-Time',
126        'cest': 'Part-Time, Diploma, Certificate',
127        'found': 'Foundation',
128        'ptee': 'Part-Time Entrance Examination',
129        'ioe_dp': 'Institute of Education Diploma',
130        'ijmbe': 'Interim Joint Matriculation Board Examination',
131        }
132
133    STUDY_MODES_DICT = {
134        'ug_ft': 'Undergraduate Full Time',
135        'ug_pt': 'Undergraduate Part Time',
136        'de_ft': 'Direct Entry Full Time',
137        'de_pt': 'Direct Entry Part Time',
138        'dp_pt': 'Diploma Part Time',
139        'dp_ft': 'Diploma Full Time',
140        'special_pg_ft': 'Postgraduate Full Time',
141        'special_pg_pt': 'Postgraduate Part Time',
142        'found': 'Foundation',
143        'transfer': 'Transfer',
144        'mug_ft': 'Undergraduate Full Time Merit List',
145        'mde_ft': 'Direct Entry Full Time Merit List',
146        }
147
148    VERDICTS_DICT = {
149        '0': 'not yet',
150        'A': 'Successful student',
151        'B': 'Student with carryover courses',
152        'C': 'Student on probation',
153        #'D': 'Withdrawn from the faculty',
154        #'E': 'Student who were previously on probation',
155        #'F': 'Medical case',
156        #'G': 'Absent from examination',
157        #'H': 'Withheld results',
158        #'I': 'Expelled/rusticated/suspended student',
159        #'J': 'Temporary withdrawn from the university',
160        #'K': 'Unregistered student',
161        #'L': 'Referred student',
162        #'M': 'Reinstatement',
163        #'N': 'Student on transfer',
164        #'O': 'NCE-III repeater',
165        #'Y': 'No previous verdict',
166        #'X': 'New 300 level student',
167        'Z': 'Successful student (provisional)',
168        #'A1': 'First Class',
169        #'A2': 'Second Class Upper',
170        #'A3': 'Second Class Lower',
171        #'A4': 'Third Class',
172        #'A5': 'Pass',
173        #'A6': 'Distinction',
174        #'A7': 'Credit',
175        #'A8': 'Merit',
176        'NEOR': 'No evidence of registration',
177        'NEOV': 'No evidence of verification',
178        'FRNS': 'Faculty requirements not satisfied',
179        }
180
181    DISABLE_PAYMENT_GROUP_DICT = {
182        'sf_all': 'School Fee - All Students',
183        'sf_pg': 'School Fee - Postgraduate Students',
184        'sf_pt': 'School Fee - Part-Time Students',
185        'sf_found': 'School Fee - Foundation Students',
186        'maint_all': 'Accommodation Fee - All Students',
187        'cl_regular': 'Acceptance Fee - Regular Students',
188        }
189
190    MODE_GROUPS = {
191        'All': ('all',),
192        'Undergraduate Full-Time': ('ug_ft', 'mde_ft', 'mug_ft', 'de_ft'),
193        'Undergraduate Part-Time': ('ug_pt', 'de_pt'),
194        'Postgraduate': ('pg_ft','special_pg_ft', 'special_pg_pt'),
195        'Foundation Programme': ('found',),
196        'Institute of Education': ('dp_ft'),
197        }
198
199    def fullname(self, firstname, lastname, middlename=None):
200        """Construct fullname.
201        """
202        try:
203            lastname = lastname.upper()
204        except AttributeError:
205            pass
206        # We do not necessarily have the middlename attribute
207        if middlename:
208            givennames = '%s %s' % (firstname, middlename)
209        else:
210            givennames = '%s' % firstname
211        givennames = string.capwords(
212            givennames.replace('-', ' - ')).replace(' - ', '-')
213        fullname = '%s, %s' % (lastname, givennames)
214        if '<' in fullname:
215            return 'XXX'
216        return fullname
Note: See TracBrowser for help on using the repository browser.