source: main/waeup.fceokene/trunk/src/waeup/fceokene/students/interfaces.py @ 11682

Last change on this file since 11682 was 10019, checked in by Henrik Bettermann, 12 years ago

Start customization of clearance slip.

  • Property svn:keywords set to Id
File size: 7.4 KB
RevLine 
[7505]1## $Id: interfaces.py 10019 2013-03-12 22:17:52Z 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##
[8868]18
[7505]19from zope import schema
[10019]20from waeup.kofa.schema import FormattedDate, PhoneNumber
21from waeup.kofa.students.interfaces import IUGStudentClearance
22from waeup.kofa.students.vocabularies import nats_vocab
23from waeup.kofa.schoolgrades import ResultEntryField
24from kofacustom.nigeria.interfaces import (
25    high_qual, high_grade, exam_types, LGASource)
[8868]26from kofacustom.nigeria.students.interfaces import (
27    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
28    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
29    INigeriaStudentStudyCourse, INigeriaCourseTicket,
30    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
[7505]31    )
[8868]32from waeup.fceokene.payments.interfaces import ICustomOnlinePayment
[8460]33from waeup.fceokene.interfaces import MessageFactory as _
[7505]34
[8868]35class ICustomStudentBase(INigeriaStudentBase):
[7618]36    """Representation of student base data.
[7505]37
38    """
[7618]39
[8868]40class ICustomStudentPersonal(INigeriaStudentPersonal):
[7618]41    """Student personal data.
42
43    """
44
[10019]45class ICustomUGStudentClearance(IUGStudentClearance):
[7995]46    """Representation of ug student clearance data.
[7505]47
[10019]48    Completely customized for FCE Okene.
49
[7505]50    """
51
[10019]52    officer_comment = schema.Text(
53        title = _(u"Officer's Comment"),
54        required = False,
55        )
56
57    clearance_locked = schema.Bool(
58        title = _(u'Clearance form locked'),
59        default = False,
60        required = False,
61        )
62
63    clr_code = schema.TextLine(
64        title = _(u'CLR Activation Code'),
65        required = False,
66        readonly = False,
67        )
68
69    date_of_birth = FormattedDate(
70        title = _(u'Date of Birth'),
71        required = False,
72        show_year = True,
73        )
74
75    nationality = schema.Choice(
76        source = nats_vocab,
77        title = _(u'Nationality'),
78        required = True,
79        )
80
81    lga = schema.Choice(
82        source = LGASource(),
83        title = _(u'State/LGA (Nigerians only)'),
84        required = False,
85        )
86
87    def_adm = schema.Bool(
88        title = _(u'Deferent of Admission'),
89        required = False,
90        readonly = False,
91        )
92
93    fst_sit_fname = schema.TextLine(
94        title = _(u'Full Name'),
95        required = False,
96        readonly = False,
97        )
98    fst_sit_no = schema.TextLine(
99        title = _(u'Exam Number'),
100        required = False,
101        readonly = False,
102        )
103
104    fst_sit_date = FormattedDate(
105        title = _(u'Exam Date'),
106        required = False,
107        readonly = False,
108        show_year = True,
109        )
110
111    fst_sit_type = schema.Choice(
112        title = _(u'Exam Type'),
113        required = False,
114        readonly = False,
115        vocabulary = exam_types,
116        )
117
118    fst_sit_results = schema.List(
119        title = _(u'Exam Results'),
120        value_type = ResultEntryField(),
121        required = False,
122        readonly = False,
123        default = [],
124        )
125
126    scd_sit_fname = schema.TextLine(
127        title = _(u'Full Name'),
128        required = False,
129        readonly = False,
130        )
131    scd_sit_no = schema.TextLine(
132        title = _(u'Exam Number'),
133        required = False,
134        readonly = False,
135        )
136
137    scd_sit_date = FormattedDate(
138        title = _(u'Exam Date'),
139        required = False,
140        readonly = False,
141        show_year = True,
142        )
143
144    scd_sit_type = schema.Choice(
145        title = _(u'Exam Type'),
146        required = False,
147        readonly = False,
148        vocabulary = exam_types,
149        )
150
151    scd_sit_results = schema.List(
152        title = _(u'Exam Results'),
153        value_type = ResultEntryField(),
154        required = False,
155        readonly = False,
156        default = [],
157        )
158
159    #alr_fname = schema.TextLine(
160    #    title = _(u'Full Name'),
161    #    required = False,
162    #    readonly = False,
163    #    )
164
165    #alr_no = schema.TextLine(
166    #    title = _(u'Exam Number'),
167    #    required = False,
168    #    readonly = False,
169    #    )
170
171    #alr_date = FormattedDate(
172    #    title = _(u'Exam Date'),
173    #    required = False,
174    #    readonly = False,
175    #    show_year = True,
176    #    )
177
178    #alr_results = schema.List(
179    #    title = _(u'Exam Results'),
180    #    value_type = ResultEntryField(),
181    #    required = False,
182    #    readonly = False,
183    #    default = [],
184    #    )
185
186    hq_type = schema.Choice(
187        title = _(u'Qualification Obtained'),
188        required = False,
189        readonly = False,
190        vocabulary = high_qual,
191        )
192
193    hq_fname = schema.TextLine(
194        title = _(u'Full Name'),
195        required = False,
196        readonly = False,
197        )
198
199    hq_matric_no = schema.TextLine(
200        title = _(u'Former Matric Number'),
201        required = False,
202        readonly = False,
203        )
204
205    #hq_degree = schema.Choice(
206    #    title = _(u'Class of Degree'),
207    #    required = False,
208    #    readonly = False,
209    #    vocabulary = high_grade,
210    #    )
211
212    hq_school = schema.TextLine(
213        title = _(u'Institution Attended'),
214        required = False,
215        readonly = False,
216        )
217
218    hq_session = schema.TextLine(
219        title = _(u'Years Attended'),
220        required = False,
221        readonly = False,
222        )
223
224    hq_disc = schema.TextLine(
225        title = _(u'Course Combination'),
226        required = False,
227        readonly = False,
228        )
229
[8868]230class ICustomPGStudentClearance(INigeriaPGStudentClearance):
[7995]231    """Representation of pg student clearance data.
[7505]232
233    """
234
[8101]235
[8204]236class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
237    ICustomPGStudentClearance,ICustomStudentPersonal):
[7995]238    """Representation of a student.
[7505]239
240    """
[8247]241
[8868]242class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
[8326]243    """A container for student study levels.
244
245    """
246
[8868]247class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
[8326]248    """A container for course tickets.
249
250    """
251
[8247]252class ICustomStudentOnlinePayment(ICustomOnlinePayment):
253    """A student payment via payment gateways.
254
[8270]255    This Interface does not inherit from IStudentOnlinePayment.
256    Thus all fields from IStudentOnlinePayment have to be repeated here.
257    """
258
[9153]259    p_current = schema.Bool(
260        title = _(u'Current Session Payment'),
261        default = True,
262        required = False,
263        )
264
[8270]265    p_level = schema.Int(
266        title = _(u'Payment Level'),
267        required = False,
268        )
[8430]269
[8270]270ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
[8326]271    'p_session'].order
272
[8868]273class ICustomCourseTicket(INigeriaCourseTicket):
[8326]274    """A course ticket.
275
[8584]276    """
277
[8868]278class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
[8584]279    """Representation of a student. Skip regular reg_number validation.
280
281    """
282
[8868]283class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
[8584]284    """Representation of a student. Skip regular matric_number validation.
285
[8868]286    """
Note: See TracBrowser for help on using the repository browser.