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

Last change on this file since 14361 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
RevLine 
[7569]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##
[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',
[14355]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',
[14258]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',
[14248]59        'fac_dep': 'Faculty and Departmental Dues',
[9755]60        }
61
62    SELECTABLE_PAYMENT_CATEGORIES = {
[13435]63        'schoolfee': 'School Fee without additional fees',
[13512]64        'schoolfee_1': 'School Fee (1st instalment) + Student Union Dues + Welfare Assurance Fee',
65        'schoolfee_2': 'School Fee (2nd instalment)',
[13463]66        'schoolfee_incl': 'School Fee + Student Union Dues + Welfare Assurance Fee',
[13435]67        'clearance': 'Acceptance Fee without additional fees',
[14239]68        'clearance_incl': 'Acceptance Fee + Matric Gown Fee + Lapel/File Fee',
[13454]69        'hostel_maintenance': 'Hostel Accommodation Fee',
[14243]70        #'application': 'Application Fee',
[11621]71        #'bed_allocation': 'Bed Allocation Fee',
72        #'transfer': 'Transfer Fee',
[14296]73        'transcript_local': 'Local Transcript Fee',
74        'transcript_inter': 'International Transcript Fee',
[13035]75        'late_registration': 'Late Course Registration Fee',
[14243]76        #'welfare': 'Student Welfare Assurance Fee',
77        #'union': 'Student Union Dues',
78        #'lapel': 'Lapel/File Fee',
79        #'matric_gown': 'Matriculation Gown Fee',
[13374]80        'concessional': 'Concessional Fee',
[14243]81        #'id_card': 'Student ID Card',
[14355]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',
[14258]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',
[14248]90        'fac_dep': 'Faculty and Departmental Dues',
[9755]91        }
92
[13451]93    REPORTABLE_PAYMENT_CATEGORIES = {
94        'schoolfee': 'School Fee',
[13452]95        'schoolfee_incl': 'School Fee Plus',
[13635]96        'schoolfee_1': 'School Fee 1 Plus',
97        'schoolfee_2': 'School Fee 2',
[13451]98        'clearance': 'Acceptance Fee',
[13452]99        'clearance_incl': 'Acceptance Fee Plus',
[13451]100        'hostel_maintenance': 'Hostel Maintenance Fee',
101        }
102
[13638]103    BALANCE_PAYMENT_CATEGORIES = {
104        'schoolfee': 'School Fee',
105        'clearance': 'Acceptance Fee',
106        'hostel_maintenance': 'Hostel Maintenance Fee',
[13750]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',
[14234]112        'id_card': 'Student ID Card',
[14258]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',
[14248]120        'fac_dep': 'Faculty and Departmental Dues',
[13638]121        }
122
[10304]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',
[10893]130        'ptee': 'Part-Time Entrance Examination',
[13568]131        'ioe_dp': 'Institute of Education Diploma',
[14339]132        'ijmbe': 'IJMBE Preparation',
[10304]133        }
134
[11591]135    STUDY_MODES_DICT = {
136        'ug_ft': 'Undergraduate Full Time',
137        'ug_pt': 'Undergraduate Part Time',
[11593]138        'de_ft': 'Direct Entry Full Time',
139        'de_pt': 'Direct Entry Part Time',
[11591]140        'dp_pt': 'Diploma Part Time',
141        'dp_ft': 'Diploma Full Time',
[13524]142        'special_pg_ft': 'Postgraduate Full Time',
143        'special_pg_pt': 'Postgraduate Part Time',
[11591]144        'found': 'Foundation',
[13498]145        'transfer': 'Transfer',
[13749]146        'mug_ft': 'Undergraduate Full Time Merit List',
147        'mde_ft': 'Direct Entry Full Time Merit List',
[14339]148        'ijmbe': 'IJMBE Preparation',
[11591]149        }
150
[13127]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        }
[13454]183
184    DISABLE_PAYMENT_GROUP_DICT = {
185        'sf_all': 'School Fee - All Students',
[14246]186        'sf_pg': 'School Fee - Postgraduate Students',
187        'sf_pt': 'School Fee - Part-Time Students',
188        'sf_found': 'School Fee - Foundation Students',
[13454]189        'maint_all': 'Accommodation Fee - All Students',
[13794]190        'cl_regular': 'Acceptance Fee - Regular Students',
[13454]191        }
[13870]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        }
[13963]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.