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

Last change on this file since 10708 was 10705, checked in by Henrik Bettermann, 11 years ago

Add personal data fields.

  • Property svn:keywords set to Id
File size: 3.5 KB
RevLine 
[7505]1## $Id: interfaces.py 10705 2013-11-06 08:59:15Z 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
[8868]61class ICustomUGStudentClearance(INigeriaUGStudentClearance):
[7995]62    """Representation of ug student clearance data.
[7505]63
64    """
65
[8868]66class ICustomPGStudentClearance(INigeriaPGStudentClearance):
[7995]67    """Representation of pg student clearance data.
[7505]68
69    """
70
[8101]71
[8204]72class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
73    ICustomPGStudentClearance,ICustomStudentPersonal):
[7995]74    """Representation of a student.
[7505]75
76    """
[8247]77
[8868]78class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
[8326]79    """A container for student study levels.
80
81    """
82
[8868]83class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
[8326]84    """A container for course tickets.
85
86    """
87
[8247]88class ICustomStudentOnlinePayment(ICustomOnlinePayment):
89    """A student payment via payment gateways.
90
[8270]91    This Interface does not inherit from IStudentOnlinePayment.
92    Thus all fields from IStudentOnlinePayment have to be repeated here.
93    """
94
[9153]95    p_current = schema.Bool(
96        title = _(u'Current Session Payment'),
97        default = True,
98        required = False,
99        )
100
[8270]101    p_level = schema.Int(
102        title = _(u'Payment Level'),
103        required = False,
104        )
[8430]105
[8270]106ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
[8326]107    'p_session'].order
108
[8868]109class ICustomCourseTicket(INigeriaCourseTicket):
[8326]110    """A course ticket.
111
[8584]112    """
113
[8868]114class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
[8584]115    """Representation of a student. Skip regular reg_number validation.
116
117    """
118
[8868]119class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
[8584]120    """Representation of a student. Skip regular matric_number validation.
121
[8868]122    """
Note: See TracBrowser for help on using the repository browser.