source: main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/interfaces.py @ 13329

Last change on this file since 13329 was 11864, checked in by Henrik Bettermann, 10 years ago

Add PIN fields to first and second sitting sections on UG clearance form'.

  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1## $Id: interfaces.py 11864 2014-10-21 08:10:34Z 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 kofacustom.nigeria.students.interfaces import (
21    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
22    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
23    INigeriaStudentStudyCourse, INigeriaCourseTicket,
24    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
25    )
26from waeup.kwarapoly.payments.interfaces import ICustomOnlinePayment
27from waeup.kwarapoly.interfaces import MessageFactory as _
28
29class ICustomStudentBase(INigeriaStudentBase):
30    """Representation of student base data.
31
32    """
33
34class ICustomStudentPersonal(INigeriaStudentPersonal):
35    """Student personal data.
36
37    """
38
39    perm_address = schema.Text(
40        title = _(u'Home Address'),
41        required = False,
42        )
43
44    corr_address = schema.Text(
45        title = _(u'Correspondence Address'),
46        required = False,
47        )
48
49    sponsor_name = schema.TextLine(
50        title = _(u'Sponsor\'s Name'),
51        required = False,
52        readonly = False,
53        )
54
55    sponsor_address = schema.Text(
56        title = _(u'Sponsor\'s Address'),
57        required = False,
58        readonly = False,
59        )
60
61class ICustomStudentPersonalEdit(ICustomStudentPersonal):
62    """Interface for editing personal data by students.
63
64    Here we can repeat the fields from IStudentPersonal and set the
65    `required` if necessary.
66    """
67
68    perm_address = schema.Text(
69        title = _(u'Home Address'),
70        required = True,
71        )
72
73    corr_address = schema.Text(
74        title = _(u'Correspondence Address'),
75        required = True,
76        )
77
78    sponsor_name = schema.TextLine(
79        title = _(u'Sponsor\'s Name'),
80        required = False,
81        readonly = False,
82        )
83
84    sponsor_address = schema.Text(
85        title = _(u'Sponsor\'s Address'),
86        required = False,
87        readonly = False,
88        )
89
90class ICustomUGStudentClearance(INigeriaUGStudentClearance):
91    """Representation of ug student clearance data.
92
93    """
94
95    fst_sit_pin = schema.TextLine(
96        title = _(u'Result Checking PIN'),
97        required = False,
98        readonly = False,
99        )
100
101    fst_sit_pin_serial = schema.TextLine(
102        title = _(u'PIN Serial Number'),
103        required = False,
104        readonly = False,
105        )
106
107    scd_sit_pin = schema.TextLine(
108        title = _(u'Result Checking PIN'),
109        required = False,
110        readonly = False,
111        )
112
113    scd_sit_pin_serial = schema.TextLine(
114        title = _(u'PIN Serial Number'),
115        required = False,
116        readonly = False,
117        )
118
119ICustomUGStudentClearance['fst_sit_pin'].order = ICustomUGStudentClearance[
120    'fst_sit_results'].order
121ICustomUGStudentClearance['fst_sit_pin_serial'].order = ICustomUGStudentClearance[
122    'fst_sit_results'].order
123ICustomUGStudentClearance['scd_sit_pin'].order = ICustomUGStudentClearance[
124    'scd_sit_results'].order
125ICustomUGStudentClearance['scd_sit_pin_serial'].order = ICustomUGStudentClearance[
126    'scd_sit_results'].order
127
128
129class ICustomPGStudentClearance(INigeriaPGStudentClearance):
130    """Representation of pg student clearance data.
131
132    """
133
134
135class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
136    ICustomPGStudentClearance,ICustomStudentPersonal):
137    """Representation of a student.
138
139    """
140
141class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
142    """A container for student study levels.
143
144    """
145
146class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
147    """A container for course tickets.
148
149    """
150
151class ICustomStudentOnlinePayment(ICustomOnlinePayment):
152    """A student payment via payment gateways.
153
154    This Interface does not inherit from IStudentOnlinePayment.
155    Thus all fields from IStudentOnlinePayment have to be repeated here.
156    """
157
158    p_current = schema.Bool(
159        title = _(u'Current Session Payment'),
160        default = True,
161        required = False,
162        )
163
164    p_level = schema.Int(
165        title = _(u'Payment Level'),
166        required = False,
167        )
168
169ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
170    'p_session'].order
171
172class ICustomCourseTicket(INigeriaCourseTicket):
173    """A course ticket.
174
175    """
176
177class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
178    """Representation of a student. Skip regular reg_number validation.
179
180    """
181
182class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
183    """Representation of a student. Skip regular matric_number validation.
184
185    """
Note: See TracBrowser for help on using the repository browser.