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

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

Add gst_text_book_5, gst_text_book_6, gst_text_book_7, gst_text_book_8

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