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

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

Show certificate-specific p_level value on payment pages.

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