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

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

Revert r14348.

Add gst_text_book_fee_0.

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