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

Last change on this file since 14378 was 13614, checked in by Henrik Bettermann, 9 years ago

Add special_handling code 'ugft' and allocate bed space accordingly.

  • Property svn:keywords set to Id
File size: 3.5 KB
RevLine 
[7569]1## $Id: utils.py 13614 2016-01-14 10:43:10Z 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
28    PREFERRED_LANGUAGES_DICT = {
29        }
[9461]30
31    APP_CATS_DICT = {
[10570]32        'basic': 'UTME, DE, PCE, PRENCE',
[9461]33        'no': 'No Application',
34        'sandwich': 'Sandwich',
35        'cest': 'Part-Time, Diploma, Certificate',
36        'bec': 'Bachelor of Education Certificate Programmes',
37        }
[9989]38
[13614]39    SPECIAL_HANDLING_DICT = {
40        'regular': 'Regular Hostel',
41        'blocked': 'Blocked Hostel',
42        'ugft': 'Undergraduate Fulltime Hostel'
43        }
[11913]44
45    PAYMENT_CATEGORIES = {
46        'schoolfee': 'School Fee',
47        'clearance': 'Acceptance Fee',
48        'bed_allocation': 'Bed Allocation Fee',
49        'hostel_maintenance': 'Hostel Maintenance Fee',
50        #'transfer': 'Transfer Fee',
51        #'gown': 'Gown Hire Fee',
52        'application': 'Application Fee',
53        #'transcript': 'Transcript Fee',
54        'third_semester': 'NCE Third Semester Fee',
55        }
56
[13030]57    DISABLE_PAYMENT_GROUP_DICT = {
58        'sf_all': 'School Fee - All Students',
59        'sf_nce1': 'School Fee - NCE I Fresh Students',
60        }
61
[11913]62    SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
63
[13128]64    VERDICTS_DICT = {
65        '0': 'not yet',
66        'A': 'Successful student',
67        'B': 'Student with carryover courses',
68        'C': 'Student on probation',
69        'D': 'Withdrawn from the faculty',
70        #'E': 'Student who were previously on probation',
71        #'F': 'Medical case',
72        'G': 'Absent from examination',
73        #'H': 'Withheld results',
74        'I': 'Expelled/rusticated/suspended student',
75        'J': 'Temporary withdrawn from the university',
76        #'K': 'Unregistered student',
77        'L': 'Referred student',
78        'M': 'Reinstatement',
79        #'N': 'Student on transfer',
80        'O': 'NCE-III repeater',
81        #'Y': 'No previous verdict',
82        #'X': 'New 300 level student (Uniben)',
83        'Z': 'Successful student (provisional)',
84        'A1': 'First Class',
85        'A2': 'Second Class Upper',
86        'A3': 'Second Class Lower',
87        'A4': 'Third Class',
88        'A5': 'Pass',
89        'A6': 'Distinction',
90        'A7': 'Credit',
91        'A8': 'Merit',
92        'OPDE': 'PDE repeater',
93        }
94
[9989]95    def getPaymentItem(self, payment):
96        """Return payment item.
97
98        Bed coordinates are only visible after payment.
99        """
100        if 'maintenance' in payment.p_category and payment.p_state != 'paid':
101            return _('(visible after successful payment)')
102        return payment.p_item
Note: See TracBrowser for help on using the repository browser.