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

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

Revert changes from r13583. This will be implemented in kofacustom.nigeria.

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