source: main/waeup.fceokene/trunk/src/waeup/fceokene/utils/utils.py @ 15362

Last change on this file since 15362 was 14936, checked in by Henrik Bettermann, 7 years ago

Enable de_ft and de_pt study modes.

  • Property svn:keywords set to Id
File size: 5.0 KB
RevLine 
[7569]1## $Id: utils.py 14936 2018-01-11 11:16:47Z 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"""
[11913]20from copy import deepcopy
[8834]21from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
[9989]22from waeup.fceokene.interfaces import MessageFactory as _
[7569]23
[8834]24class CustomKofaUtils(NigeriaKofaUtils):
[7569]25    """A collection of methods subject to customization.
26    """
[7845]27
[14590]28    STUDY_MODES_DICT = {
29        #'ume_ft': 'UME Full Time',
30        'ug_ft': 'Undergraduate Full Time',
31        #'ug_pt': 'Undergraduate Part Time',
32        #'dp_pt': 'Diploma Part Time',
33        'ct_ft': 'Certificate Full Time',
34        #'dp_ft': 'Diploma Full Time',
[14936]35        'de_ft': 'Direct Entry Full Time',
36        'de_pt': 'Direct Entry Part Time',
[14590]37        #'nd_ft': 'National Diploma Full Time',
38        #'nd_pt': 'National Diploma Part Time',
39        #'hnd_ft': 'Higher National Diploma Full Time',
40        #'hnd_pt': 'Higher National Diploma Part Time',
41        #'pg_ft': 'Postgraduate Full Time',
42        #'pg_pt': 'Postgraduate Part Time',
43        #'pgd_ft': 'Postgraduate Diploma Full Time',
44        #'pgd_pt': 'Postgraduate Diploma Part Time',
45        #'special_pg_pt': 'Special Postgraduate Part Time',
46        'nce_ft': 'NCE Full Time',
47        #'nce_pt': 'NCE Part Time',
48        #'ug_sw': 'Undergraduate Sandwich',
49        'nce_sw': 'NCE Sandwich',
50        #'jm_ft': 'Joint Matriculation Full Time',
51        #'ph_ft': 'Post Higher Education Full Time',
52        #'transfer_pt': 'Transfer Part Time',
53        #'transfer_ft': 'Transfer Full Time',
54        #'ct_pt': 'Certificate Part Time',
55        #'rmd_ft': 'Remedial with deficiencies',
56        #'rm_ft': 'Remedial',
57        'transfer': 'Transfer',
[14812]58        'prence': 'Pre-NCE/Pre-Degree',
[14590]59        #'prend': 'Pre-ND',
60        #'pce': 'PCE',
61        'pd_ft': 'Professional Diploma in Education',
62        #'found': 'Foundation',
63        'no': 'no application',
64        }
65
[7845]66    PREFERRED_LANGUAGES_DICT = {
67        }
[9461]68
69    APP_CATS_DICT = {
[10570]70        'basic': 'UTME, DE, PCE, PRENCE',
[9461]71        'no': 'No Application',
72        'sandwich': 'Sandwich',
73        'cest': 'Part-Time, Diploma, Certificate',
74        'bec': 'Bachelor of Education Certificate Programmes',
[14812]75        'pre': 'Pre-Degree Studies',
76        'prence': 'Pre-NCE/Pre-Degree Programmes',
[9461]77        }
[9989]78
[13614]79    SPECIAL_HANDLING_DICT = {
80        'regular': 'Regular Hostel',
81        'blocked': 'Blocked Hostel',
82        'ugft': 'Undergraduate Fulltime Hostel'
83        }
[11913]84
85    PAYMENT_CATEGORIES = {
86        'schoolfee': 'School Fee',
87        'clearance': 'Acceptance Fee',
88        'bed_allocation': 'Bed Allocation Fee',
89        'hostel_maintenance': 'Hostel Maintenance Fee',
90        #'transfer': 'Transfer Fee',
91        #'gown': 'Gown Hire Fee',
92        'application': 'Application Fee',
93        #'transcript': 'Transcript Fee',
94        'third_semester': 'NCE Third Semester Fee',
95        }
96
[13030]97    DISABLE_PAYMENT_GROUP_DICT = {
98        'sf_all': 'School Fee - All Students',
99        'sf_nce1': 'School Fee - NCE I Fresh Students',
100        }
101
[11913]102    SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
103
[13128]104    VERDICTS_DICT = {
105        '0': 'not yet',
106        'A': 'Successful student',
107        'B': 'Student with carryover courses',
108        'C': 'Student on probation',
109        'D': 'Withdrawn from the faculty',
110        #'E': 'Student who were previously on probation',
111        #'F': 'Medical case',
112        'G': 'Absent from examination',
113        #'H': 'Withheld results',
114        'I': 'Expelled/rusticated/suspended student',
115        'J': 'Temporary withdrawn from the university',
116        #'K': 'Unregistered student',
117        'L': 'Referred student',
118        'M': 'Reinstatement',
119        #'N': 'Student on transfer',
120        'O': 'NCE-III repeater',
121        #'Y': 'No previous verdict',
122        #'X': 'New 300 level student (Uniben)',
123        'Z': 'Successful student (provisional)',
124        'A1': 'First Class',
125        'A2': 'Second Class Upper',
126        'A3': 'Second Class Lower',
127        'A4': 'Third Class',
128        'A5': 'Pass',
129        'A6': 'Distinction',
130        'A7': 'Credit',
131        'A8': 'Merit',
132        'OPDE': 'PDE repeater',
133        }
134
[9989]135    def getPaymentItem(self, payment):
136        """Return payment item.
137
138        Bed coordinates are only visible after payment.
139        """
140        if 'maintenance' in payment.p_category and payment.p_state != 'paid':
141            return _('(visible after successful payment)')
142        return payment.p_item
Note: See TracBrowser for help on using the repository browser.