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

Last change on this file since 13606 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
RevLine 
[7505]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##
[8868]18
[7505]19from zope import schema
[8868]20from kofacustom.nigeria.students.interfaces import (
21    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
22    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
23    INigeriaStudentStudyCourse, INigeriaCourseTicket,
24    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
[7505]25    )
[9347]26from waeup.kwarapoly.payments.interfaces import ICustomOnlinePayment
27from waeup.kwarapoly.interfaces import MessageFactory as _
[7505]28
[8868]29class ICustomStudentBase(INigeriaStudentBase):
[7618]30    """Representation of student base data.
[7505]31
32    """
[7618]33
[8868]34class ICustomStudentPersonal(INigeriaStudentPersonal):
[7618]35    """Student personal data.
36
37    """
38
[10705]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
[10710]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
[8868]90class ICustomUGStudentClearance(INigeriaUGStudentClearance):
[7995]91    """Representation of ug student clearance data.
[7505]92
93    """
94
[11864]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
[8868]129class ICustomPGStudentClearance(INigeriaPGStudentClearance):
[7995]130    """Representation of pg student clearance data.
[7505]131
132    """
133
[8101]134
[8204]135class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
136    ICustomPGStudentClearance,ICustomStudentPersonal):
[7995]137    """Representation of a student.
[7505]138
139    """
[8247]140
[8868]141class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
[8326]142    """A container for student study levels.
143
144    """
145
[8868]146class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
[8326]147    """A container for course tickets.
148
149    """
150
[8247]151class ICustomStudentOnlinePayment(ICustomOnlinePayment):
152    """A student payment via payment gateways.
153
[8270]154    This Interface does not inherit from IStudentOnlinePayment.
155    Thus all fields from IStudentOnlinePayment have to be repeated here.
156    """
157
[9153]158    p_current = schema.Bool(
159        title = _(u'Current Session Payment'),
160        default = True,
161        required = False,
162        )
163
[8270]164    p_level = schema.Int(
165        title = _(u'Payment Level'),
166        required = False,
167        )
[8430]168
[8270]169ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
[8326]170    'p_session'].order
171
[8868]172class ICustomCourseTicket(INigeriaCourseTicket):
[8326]173    """A course ticket.
174
[8584]175    """
176
[8868]177class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
[8584]178    """Representation of a student. Skip regular reg_number validation.
179
180    """
181
[8868]182class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
[8584]183    """Representation of a student. Skip regular matric_number validation.
184
[8868]185    """
Note: See TracBrowser for help on using the repository browser.