source: main/kofacustom.udss/trunk/src/kofacustom/udss/students/interfaces.py @ 17778

Last change on this file since 17778 was 17737, checked in by Henrik Bettermann, 7 months ago

More adjustments.

  • Property svn:keywords set to Id
File size: 6.1 KB
Line 
1## $Id: interfaces.py 17737 2024-04-16 06:29:43Z 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
19from zope import schema
20from waeup.kofa.interfaces import SimpleKofaVocabulary, academic_sessions_vocab
21from waeup.kofa.students.vocabularies import StudyLevelSource
22from waeup.kofa.students.interfaces import IStudentPersonal, IUGStudentClearance
23from kofacustom.nigeria.students.interfaces import (
24    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
25    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
26    INigeriaStudentStudyCourse, INigeriaCourseTicket,
27    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
28    )
29from kofacustom.udss.payments.interfaces import ICustomOnlinePayment
30from kofacustom.udss.interfaces import MessageFactory as _
31
32class ICustomStudentBase(INigeriaStudentBase):
33    """Representation of student base data.
34
35    """
36
37class ICustomStudentPersonal(IStudentPersonal):
38    """Student personal data.
39
40    """
41
42    religion = schema.Choice(
43        title = u'Religion',
44        default = 'no_say',
45        required = False,
46        vocabulary = SimpleKofaVocabulary(
47            (_('Muslim'), 'muslim'),
48            (_('Christian'), 'christian'),
49            (_('Others'), 'others'),
50            (_('Prefer not to say'), 'no_say'),)
51        )
52
53    disabled = schema.Bool(
54        title = u'Disabled',
55        default = False,
56        required = False,
57        )
58
59    father_firstname = schema.TextLine(
60        title = _(u'First Name of Father'),
61        required = False,
62        )
63    father_middlename = schema.TextLine(
64        title = _(u'Middle Name of Father'),
65        required = False,
66        )
67    father_lastname = schema.TextLine(
68        title = _(u'Last Name (Surname) of Father'),
69        required = False,
70        )
71    father_status = schema.TextLine(
72        title = _(u'Father\'s Status and Rank'),
73        required = False,
74        )
75    father_employer = schema.TextLine(
76        title = _(u'Father\'s Employer'),
77        required = False,
78        )
79    father_res_address = schema.Text(
80        title = _(u'Father\'s Residential Address'),
81        required = False,
82        )
83    father_contact_address = schema.Text(
84        title = _(u'Father\'s Contact Address (incl. P.O. Box)'),
85        required = False,
86        )
87    mother_firstname = schema.TextLine(
88        title = _(u'First Name of Mother'),
89        required = False,
90        )
91    mother_middlename = schema.TextLine(
92        title = _(u'Middle Name of Mother'),
93        required = False,
94        )
95    mother_lastname = schema.TextLine(
96        title = _(u'Last Name (Surname) of Mother'),
97        required = False,
98        )
99    mother_status = schema.TextLine(
100        title = _(u'Mother\'s Status and Rank'),
101        required = False,
102        )
103    mother_employer = schema.TextLine(
104        title = _(u'Mother\'s Employer'),
105        required = False,
106        )
107    mother_res_address = schema.Text(
108        title = _(u'Mother\'s Residential Address'),
109        required = False,
110        )
111    mother_contact_address = schema.Text(
112        title = _(u'Mother\'s Contact Address (incl. P.O. Box)'),
113        required = False,
114        )
115    sponsor_firstname = schema.TextLine(
116        title = _(u'First Name of sponsor'),
117        required = False,
118        )
119    sponsor_middlename = schema.TextLine(
120        title = _(u'Middle Name of Sponsor'),
121        required = False,
122        )
123    sponsor_lastname = schema.TextLine(
124        title = _(u'Last Name (Surname) of Sponsor'),
125        required = False,
126        )
127    sponsor_status = schema.TextLine(
128        title = _(u'Sponsor\'s Status and Rank'),
129        required = False,
130        )
131    sponsor_employer = schema.TextLine(
132        title = _(u'Sponsor\'s Employer'),
133        required = False,
134        )
135    sponsor_res_address = schema.Text(
136        title = _(u'Sponsor\'s Residential Address'),
137        required = False,
138        )
139    sponsor_contact_address = schema.Text(
140        title = _(u'Sponsor\'s Contact Address (incl. P.O. Box)'),
141        required = False,
142        )
143
144class ICustomStudentClearance(IUGStudentClearance):
145    """Representation of ug student clearance data.
146
147    """
148
149class ICustomStudent(ICustomStudentBase,ICustomStudentClearance,
150    ICustomStudentPersonal):
151    """Representation of a student.
152
153    """
154
155class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
156    """A container for student study levels.
157
158    """
159
160class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
161    """A container for course tickets.
162
163    """
164
165class ICustomStudentOnlinePayment(ICustomOnlinePayment):
166    """A student payment via payment gateways.
167
168    This Interface does not inherit from IStudentOnlinePayment.
169    Thus all fields from IStudentOnlinePayment have to be repeated here.
170    """
171
172    p_current = schema.Bool(
173        title = _(u'Current Session Payment'),
174        default = True,
175        required = False,
176        )
177
178    p_level = schema.Choice(
179        title = _(u'Payment Level'),
180        source = StudyLevelSource(),
181        required = False,
182        )
183
184ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
185    'p_session'].order
186
187class ICustomCourseTicket(INigeriaCourseTicket):
188    """A course ticket.
189
190    """
191
192class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
193    """Representation of a student. Skip regular reg_number validation.
194
195    """
196
197class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
198    """Representation of a student. Skip regular matric_number validation.
199
200    """
Note: See TracBrowser for help on using the repository browser.