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

Last change on this file since 13621 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
RevLine 
[7505]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##
[8865]18
[8866]19from zope import schema
[12856]20from waeup.kofa.interfaces import validate_email
[8865]21from kofacustom.nigeria.students.interfaces import (
22    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
[13085]23    INigeriaStudentPersonal, INigeriaStudentPersonalEdit,
24    INigeriaStudentStudyLevel,
[8865]25    INigeriaStudentStudyCourse, INigeriaCourseTicket,
26    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
[7505]27    )
[8866]28from waeup.uniben.payments.interfaces import ICustomOnlinePayment
29from waeup.uniben.interfaces import MessageFactory as _
[7505]30
[8865]31class ICustomStudentBase(INigeriaStudentBase):
[7618]32    """Representation of student base data.
[7505]33    """
[7618]34
[8865]35class ICustomStudentPersonal(INigeriaStudentPersonal):
[7618]36    """Student personal data.
[13085]37    """
[7618]38
[13085]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.
[7618]47    """
48
[12856]49    parent_email = schema.ASCIILine(
50        title = _(u'Parent Email'),
51        required = False,
52        constraint=validate_email,
53        )
54
[8865]55class ICustomUGStudentClearance(INigeriaUGStudentClearance):
[7995]56    """Representation of ug student clearance data.
[7505]57    """
58
[8865]59class ICustomPGStudentClearance(INigeriaPGStudentClearance):
[7995]60    """Representation of pg student clearance data.
[7505]61    """
62
[12856]63class ICustomStudent(ICustomStudentBase, ICustomUGStudentClearance,
64    ICustomPGStudentClearance, ICustomStudentPersonal):
[7995]65    """Representation of a student.
[7505]66    """
[8247]67
[8865]68class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
[8326]69    """A container for student study levels.
70    """
71
[8865]72class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
[8326]73    """A container for course tickets.
74    """
75
[8866]76class ICustomStudentOnlinePayment(ICustomOnlinePayment):
[8247]77    """A student payment via payment gateways.
78
[8866]79    This Interface does not inherit from IStudentOnlinePayment.
80    Thus all fields from IStudentOnlinePayment have to be repeated here.
[8270]81    """
82
[9152]83    p_current = schema.Bool(
84        title = _(u'Current Session Payment'),
85        default = True,
86        required = False,
87        )
88
[8866]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
[8865]97class ICustomCourseTicket(INigeriaCourseTicket):
[8326]98    """A course ticket.
[8582]99    """
100
[8865]101class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
[8582]102    """Representation of a student. Skip regular reg_number validation.
103    """
104
[8865]105class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
[8582]106    """Representation of a student. Skip regular matric_number validation.
107    """
Note: See TracBrowser for help on using the repository browser.