source: main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py @ 12879

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

Add parent_email. This field is only editable by managers.

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1## $Id: interfaces.py 12856 2015-04-14 12:01:57Z 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 waeup.kofa.interfaces import validate_email
21from kofacustom.nigeria.students.interfaces import (
22    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
23    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
24    INigeriaStudentStudyCourse, INigeriaCourseTicket,
25    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
26    )
27from waeup.uniben.payments.interfaces import ICustomOnlinePayment
28from waeup.uniben.interfaces import MessageFactory as _
29
30class ICustomStudentBase(INigeriaStudentBase):
31    """Representation of student base data.
32
33    """
34
35class ICustomStudentPersonal(INigeriaStudentPersonal):
36    """Student personal data.
37
38    """
39
40    parent_email = schema.ASCIILine(
41        title = _(u'Parent Email'),
42        required = False,
43        constraint=validate_email,
44        )
45
46class ICustomUGStudentClearance(INigeriaUGStudentClearance):
47    """Representation of ug student clearance data.
48
49    """
50
51class ICustomPGStudentClearance(INigeriaPGStudentClearance):
52    """Representation of pg student clearance data.
53
54    """
55
56
57class ICustomStudent(ICustomStudentBase, ICustomUGStudentClearance,
58    ICustomPGStudentClearance, ICustomStudentPersonal):
59    """Representation of a student.
60
61    """
62
63class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
64    """A container for student study levels.
65
66    """
67
68class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
69    """A container for course tickets.
70
71    """
72
73class ICustomStudentOnlinePayment(ICustomOnlinePayment):
74    """A student payment via payment gateways.
75
76    This Interface does not inherit from IStudentOnlinePayment.
77    Thus all fields from IStudentOnlinePayment have to be repeated here.
78    """
79
80    p_current = schema.Bool(
81        title = _(u'Current Session Payment'),
82        default = True,
83        required = False,
84        )
85
86    p_level = schema.Int(
87        title = _(u'Payment Level'),
88        required = False,
89        )
90
91ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
92    'p_session'].order
93
94class ICustomCourseTicket(INigeriaCourseTicket):
95    """A course ticket.
96
97    """
98
99class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
100    """Representation of a student. Skip regular reg_number validation.
101
102    """
103
104class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
105    """Representation of a student. Skip regular matric_number validation.
106
107    """
Note: See TracBrowser for help on using the repository browser.