1 | ## $Id: interfaces.py 11832 2014-10-13 10:40:59Z 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 | |
---|
19 | from zope import schema |
---|
20 | from waeup.kofa.students.interfaces import ( |
---|
21 | IStudentBase, IUGStudentClearance, IPGStudentClearance, |
---|
22 | IStudentPersonal, IStudentStudyLevel, |
---|
23 | IStudentStudyCourse, ICourseTicket, |
---|
24 | IStudentUpdateByRegNo, IStudentUpdateByMatricNo, |
---|
25 | ) |
---|
26 | from kofacustom.pcn.payments.interfaces import ICustomOnlinePayment |
---|
27 | from kofacustom.pcn.interfaces import MessageFactory as _ |
---|
28 | |
---|
29 | class ICustomStudentBase(IStudentBase): |
---|
30 | """Representation of student base data. |
---|
31 | |
---|
32 | """ |
---|
33 | |
---|
34 | class ICustomStudentPersonal(IStudentPersonal): |
---|
35 | """Student personal data. |
---|
36 | |
---|
37 | """ |
---|
38 | |
---|
39 | class ICustomUGStudentClearance(IUGStudentClearance): |
---|
40 | """Representation of ug student clearance data. |
---|
41 | |
---|
42 | """ |
---|
43 | |
---|
44 | class ICustomPGStudentClearance(IPGStudentClearance): |
---|
45 | """Representation of pg student clearance data. |
---|
46 | |
---|
47 | """ |
---|
48 | |
---|
49 | |
---|
50 | class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance, |
---|
51 | ICustomPGStudentClearance,ICustomStudentPersonal): |
---|
52 | """Representation of a student. |
---|
53 | |
---|
54 | """ |
---|
55 | |
---|
56 | class ICustomStudentStudyCourse(IStudentStudyCourse): |
---|
57 | """A container for student study levels. |
---|
58 | |
---|
59 | """ |
---|
60 | |
---|
61 | class ICustomStudentStudyLevel(IStudentStudyLevel): |
---|
62 | """A container for course tickets. |
---|
63 | |
---|
64 | """ |
---|
65 | |
---|
66 | class ICustomStudentOnlinePayment(ICustomOnlinePayment): |
---|
67 | """A student payment via payment gateways. |
---|
68 | |
---|
69 | This Interface does not inherit from IStudentOnlinePayment. |
---|
70 | Thus all fields from IStudentOnlinePayment have to be repeated here. |
---|
71 | """ |
---|
72 | |
---|
73 | p_current = schema.Bool( |
---|
74 | title = _(u'Current Session Payment'), |
---|
75 | default = True, |
---|
76 | required = False, |
---|
77 | ) |
---|
78 | |
---|
79 | p_level = schema.Int( |
---|
80 | title = _(u'Payment Level'), |
---|
81 | required = False, |
---|
82 | ) |
---|
83 | |
---|
84 | ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[ |
---|
85 | 'p_session'].order |
---|
86 | |
---|
87 | class ICustomCourseTicket(ICourseTicket): |
---|
88 | """A course ticket. |
---|
89 | |
---|
90 | """ |
---|
91 | |
---|
92 | class ICustomStudentUpdateByRegNo(IStudentUpdateByRegNo): |
---|
93 | """Representation of a student. Skip regular reg_number validation. |
---|
94 | |
---|
95 | """ |
---|
96 | |
---|
97 | class ICustomStudentUpdateByMatricNo(IStudentUpdateByMatricNo): |
---|
98 | """Representation of a student. Skip regular matric_number validation. |
---|
99 | |
---|
100 | """ |
---|