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