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

Last change on this file since 14354 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
RevLine 
[7569]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##
[7822]18"""Customize general helper utilities for Kofa.
[7569]19"""
[13963]20
21import string
[8823]22from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
[7569]23
[8823]24class CustomKofaUtils(NigeriaKofaUtils):
[7569]25    """A collection of methods subject to customization.
26    """
[7845]27
28    PREFERRED_LANGUAGES_DICT = {
[9755]29        }
30
31    PAYMENT_CATEGORIES = {
32        'schoolfee': 'School Fee',
[13512]33        'schoolfee_1': 'School Fee Plus (1st instalment)',
34        'schoolfee_2': 'School Fee (2nd instalment)',
[13410]35        'schoolfee_incl': 'School Fee Plus',
[9755]36        'clearance': 'Acceptance Fee',
[13410]37        'clearance_incl': 'Acceptance Fee Plus',
[13424]38        'hostel_maintenance': 'Hostel Accommodation Fee',
[9755]39        'application': 'Application Fee',
40        'bed_allocation': 'Bed Allocation Fee',
41        'transfer': 'Transfer Fee',
[14296]42        'transcript_local': 'Local Transcript Fee',
43        'transcript_inter': 'International Transcript Fee',
[13035]44        'late_registration': 'Late Course Registration Fee',
[13402]45        'welfare': 'Student Welfare Assurance Fee',
[13463]46        'union': 'Student Union Dues',
[13402]47        'lapel': 'Lapel/File Fee',
[13374]48        'matric_gown': 'Matriculation Gown Fee',
49        'concessional': 'Concessional Fee',
[14234]50        'id_card': 'Student ID Card',
[14348]51        'gst_text_book_1': 'Text Book Fee GST101 and GST102',
52        'gst_text_book_2': 'Text Book Fee GST111 and GST112',
[14258]53        'gst_text_book_3': 'Text Book Fee GST222',
54        'ent_text_book_4': 'Text Book Fee ENT201',
[14348]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',
[14258]59        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
60        'gst_registration_2': 'Registration Fee GST222',
61        'ent_registration_3': 'Registration Fee ENT201',
[14248]62        'fac_dep': 'Faculty and Departmental Dues',
[9755]63        }
64
65    SELECTABLE_PAYMENT_CATEGORIES = {
[13435]66        'schoolfee': 'School Fee without additional fees',
[13512]67        'schoolfee_1': 'School Fee (1st instalment) + Student Union Dues + Welfare Assurance Fee',
68        'schoolfee_2': 'School Fee (2nd instalment)',
[13463]69        'schoolfee_incl': 'School Fee + Student Union Dues + Welfare Assurance Fee',
[13435]70        'clearance': 'Acceptance Fee without additional fees',
[14239]71        'clearance_incl': 'Acceptance Fee + Matric Gown Fee + Lapel/File Fee',
[13454]72        'hostel_maintenance': 'Hostel Accommodation Fee',
[14243]73        #'application': 'Application Fee',
[11621]74        #'bed_allocation': 'Bed Allocation Fee',
75        #'transfer': 'Transfer Fee',
[14296]76        'transcript_local': 'Local Transcript Fee',
77        'transcript_inter': 'International Transcript Fee',
[13035]78        'late_registration': 'Late Course Registration Fee',
[14243]79        #'welfare': 'Student Welfare Assurance Fee',
80        #'union': 'Student Union Dues',
81        #'lapel': 'Lapel/File Fee',
82        #'matric_gown': 'Matriculation Gown Fee',
[13374]83        'concessional': 'Concessional Fee',
[14243]84        #'id_card': 'Student ID Card',
[14348]85        'gst_text_book_1': 'Text Book Fee GST101 and GST102',
86        'gst_text_book_2': 'Text Book Fee GST111 and GST112',
[14258]87        'gst_text_book_3': 'Text Book Fee GST222',
88        'ent_text_book_4': 'Text Book Fee ENT201',
[14348]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',
[14258]93        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
94        'gst_registration_2': 'Registration Fee GST222',
95        'ent_registration_3': 'Registration Fee ENT201',
[14248]96        'fac_dep': 'Faculty and Departmental Dues',
[9755]97        }
98
[13451]99    REPORTABLE_PAYMENT_CATEGORIES = {
100        'schoolfee': 'School Fee',
[13452]101        'schoolfee_incl': 'School Fee Plus',
[13635]102        'schoolfee_1': 'School Fee 1 Plus',
103        'schoolfee_2': 'School Fee 2',
[13451]104        'clearance': 'Acceptance Fee',
[13452]105        'clearance_incl': 'Acceptance Fee Plus',
[13451]106        'hostel_maintenance': 'Hostel Maintenance Fee',
107        }
108
[13638]109    BALANCE_PAYMENT_CATEGORIES = {
110        'schoolfee': 'School Fee',
111        'clearance': 'Acceptance Fee',
112        'hostel_maintenance': 'Hostel Maintenance Fee',
[13750]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',
[14234]118        'id_card': 'Student ID Card',
[14258]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',
[14248]126        'fac_dep': 'Faculty and Departmental Dues',
[13638]127        }
128
[10304]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',
[10893]136        'ptee': 'Part-Time Entrance Examination',
[13568]137        'ioe_dp': 'Institute of Education Diploma',
[14339]138        'ijmbe': 'IJMBE Preparation',
[10304]139        }
140
[11591]141    STUDY_MODES_DICT = {
142        'ug_ft': 'Undergraduate Full Time',
143        'ug_pt': 'Undergraduate Part Time',
[11593]144        'de_ft': 'Direct Entry Full Time',
145        'de_pt': 'Direct Entry Part Time',
[11591]146        'dp_pt': 'Diploma Part Time',
147        'dp_ft': 'Diploma Full Time',
[13524]148        'special_pg_ft': 'Postgraduate Full Time',
149        'special_pg_pt': 'Postgraduate Part Time',
[11591]150        'found': 'Foundation',
[13498]151        'transfer': 'Transfer',
[13749]152        'mug_ft': 'Undergraduate Full Time Merit List',
153        'mde_ft': 'Direct Entry Full Time Merit List',
[14339]154        'ijmbe': 'IJMBE Preparation',
[11591]155        }
156
[13127]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        }
[13454]189
190    DISABLE_PAYMENT_GROUP_DICT = {
191        'sf_all': 'School Fee - All Students',
[14246]192        'sf_pg': 'School Fee - Postgraduate Students',
193        'sf_pt': 'School Fee - Part-Time Students',
194        'sf_found': 'School Fee - Foundation Students',
[13454]195        'maint_all': 'Accommodation Fee - All Students',
[13794]196        'cl_regular': 'Acceptance Fee - Regular Students',
[13454]197        }
[13870]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        }
[13963]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.