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

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