source: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/utils/utils.py @ 17727

Last change on this file since 17727 was 17704, checked in by Henrik Bettermann, 9 months ago

See ticket #60

  • Property svn:keywords set to Id
File size: 6.6 KB
RevLine 
[10765]1## $Id: utils.py 17704 2024-02-26 08:50:11Z 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"""
[15011]20from copy import deepcopy
[10765]21from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
22
23class CustomKofaUtils(NigeriaKofaUtils):
24    """A collection of methods subject to customization.
25    """
26
[15074]27    APP_CATS_DICT = {
28        'basic': 'Basic Application',
29        'no': 'no application',
[15082]30        'ft': 'Full Time Courses',
31        'pt': 'Part Time Courses',
[15093]32        'pre': 'Pre-Degree Studies',
[15103]33        'ct': 'Certificate Programmes',
[15109]34        'ndft': 'National Diploma Full-Time Programmes',
35        'ndpt': 'National Diploma Part-Time Programmes',
36        'ndwe': 'National Diploma Weekend Programmes',
[15410]37        'nde': 'National Diploma Part-Time Evening Programmes',
[15109]38        'hndft': 'Higher National Diploma Full-Time Programmes',
39        'hndpt': 'Higher National Diploma Part-Time Programmes',
40        'hndwe': 'Higher National Diploma Weekend Programmes',
[15410]41        'hnde': 'Higher National Diploma Part-Time Evening Programmes',
[15109]42
[15074]43        }
44
[15011]45    PAYMENT_CATEGORIES = {
[15105]46        'schoolfee': 'Tuition/Exams Fee',
[15011]47        'clearance': 'Acceptance Fee',
48        'bed_allocation': 'Accommodation Booking Fee',
49        'hostel_maintenance': 'Hostel Maintenance Fee',
50        'application': 'Application Fee',
[15041]51        'ict_entre': 'ICT and Entrepreneur Fee',
[15013]52        'logbook_combo': 'Logbook Combo Fee',
[15015]53        'siwess_combo': 'SIWESS Combo Fee',
54        'transcript': 'Transcript Fee',
55        'certificate': 'Certificate Fee',
[15071]56        'certificate_confirm': 'Certificate Confirmation Fee',
57        'late_registration': 'Late Course Registration Fee',
58        'final_clearance': 'Final Clearance Fee',
[15105]59        'union': 'Student Union Dues',
[15123]60        'admission_checking': 'Admission Checking Fee',
[16324]61        'medical': 'Medical Laboratory Test Fee',
[17103]62        'conv_nd': 'Convocation Fee ND',
63        'conv_hnd': 'Convocation Fee HND',
[16325]64        'nhis': 'TISHIP Fee',
[15655]65        'coc': 'Change of Course Fee',
66        'damages': 'Damages Fee',
67        'project_bind': 'Project Binding Fee',
[16341]68        'maintenance':'Maintenance and Utility Fees',
[16820]69        'cyber': 'Cyber Security',
70        'ispon': 'ISPON Safety',
[17104]71        'indigene': 'Non-State Indigene Fee',
72        'develop': 'Development Fee',
73        'sport': 'Sport Development Fee',
[17635]74        'gown': 'Matriculation Gown Fee',
75        'global_practics': 'Global Practics Fee',
[15011]76        }
77
[15218]78    SELECTABLE_PAYMENT_CATEGORIES = {
79        'schoolfee': 'Tuition/Exams Fee',
80        'clearance': 'Acceptance Fee',
81        'bed_allocation': 'Accommodation Booking Fee',
82        'hostel_maintenance': 'Hostel Maintenance Fee',
83        'application': 'Application Fee',
84        'ict_entre': 'ICT and Entrepreneur Fee',
85        'logbook_combo': 'Logbook Combo Fee',
86        'siwess_combo': 'SIWESS Combo Fee',
[17569]87        #'transcript': 'Transcript Fee',
[15218]88        'certificate': 'Certificate Fee',
89        'certificate_confirm': 'Certificate Confirmation Fee',
90        'late_registration': 'Late Course Registration Fee',
91        'final_clearance': 'Final Clearance Fee',
92        'union': 'Student Union Dues',
93        'admission_checking': 'Admission Checking Fee',
[16324]94        'medical': 'Medical Laboratory Test Fee',
[17103]95        'conv_nd': 'Convocation Fee ND',
96        'conv_hnd': 'Convocation Fee HND',
[17569]97        #'nhis': 'TISHIP Fee',
[15655]98        'coc': 'Change of Course Fee',
99        'damages': 'Damages Fee',
100        'project_bind': 'Project Binding Fee',
[16341]101        'maintenance':'Maintenance and Utility Fees',
[16820]102        'cyber': 'Cyber Security',
103        'ispon': 'ISPON Safety',
[17104]104        'indigene': 'Non-State Indigene Fee',
105        'develop': 'Development Fee',
[17635]106        'sport': 'Sport Development Fee',
107        'gown': 'Matriculation Gown Fee',
108        'global_practics': 'Global Practics Fee',
[15218]109        }
[15441]110
111    def selectable_payment_categories(self, student):
[15445]112        spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES)
[15442]113        if not student.is_fresh:
114            del spc['application']
115            del spc['admission_checking']
116            del spc['clearance']
[17703]117        if student.current_mode == 'hnd_ft':
[17704]118            del spc['logbook_combo']
[15442]119        return spc
[15441]120
[15193]121    PREVIOUS_PAYMENT_CATEGORIES = deepcopy(SELECTABLE_PAYMENT_CATEGORIES)
122
[15028]123    BALANCE_PAYMENT_CATEGORIES = {
[15105]124        'schoolfee': 'Tuition/Exams Fee',
[15041]125        'ict_entre': 'ICT and Entrepreneur Fee',
[15071]126        'certificate_confirm': 'Certificate Confirmation Fee',
127        'final_clearance': 'Final Clearance Fee',
[15034]128        }
129
130    REPORTABLE_PAYMENT_CATEGORIES = {
[15082]131        'schoolfee': 'Tuition Exams Fee',
132        'clearance': 'Accept. Fee',
133        'hostel_maintenance': 'Hostel Maint. Fee',
134        'ict_entre': 'ICT Entrepr. Fee',
[15034]135        'logbook_combo': 'Logbook Combo Fee',
136        'siwess_combo': 'SIWESS Combo Fee',
[15082]137        'certificate': 'Cert. Fee',
138        'certificate_confirm': 'Cert. Confirm. Fee',
139        'late_registration': 'Late Course Registr. Fee',
[15071]140        'final_clearance': 'Final Clearance Fee',
[15105]141        'union': 'Student Union Dues',
[16324]142        'medical': 'Medical Laboratory Test Fee',
[15069]143        }
144
[15218]145    SPECIAL_APP_DICT = {
146        'conv_nd': 'Convocation ND',
147        'conv_hnd': 'Convocation HND',
148        }
149
[15069]150    STUDY_MODES_DICT = {
[15073]151        'ug_ft': 'Undergraduate Full Time (not used in EdoPoly)',
[15109]152        'nd_ft': 'National Diploma Full-Time',
153        'nd_pt': 'National Diploma Part-Time',
154        'nd_we': 'National Diploma Weekend',
155        'hnd_ft': 'Higher National Diploma Full-Time',
156        'hnd_pt': 'Higher National Diploma Part-Time',
157        'hnd_we': 'Higher National Diploma Weekend',
[15103]158        'ct': 'Certificate',
[15093]159        'pre': 'Pre-Degree',
[15069]160        'transfer': 'Transfer',
161        'no': 'no application',
162        }
163
164    MODE_GROUPS = {
165        'All': ('all',),
[17389]166        'National Diploma Full-Time': ('nd_ft',),
167        'National Diploma Part-Time': ('nd_pt',),
168        'Higher National Diploma Full-Time': ('hnd_ft',),
169        'Higher National Diploma Part-Time': ('hnd_pt',),
170        'Certificate': ('ct',),
171        'Pre-Degree': ('pre',),
[15069]172        }
Note: See TracBrowser for help on using the repository browser.