[10765] | 1 | ## $Id: interfaces.py 16817 2022-02-17 09:09:52Z 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 |
---|
[13740] | 20 | from waeup.kofa.students.vocabularies import StudyLevelSource |
---|
[10765] | 21 | from kofacustom.nigeria.students.interfaces import ( |
---|
| 22 | INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance, |
---|
| 23 | INigeriaStudentPersonal, INigeriaStudentStudyLevel, |
---|
| 24 | INigeriaStudentStudyCourse, INigeriaCourseTicket, |
---|
| 25 | INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo, |
---|
| 26 | ) |
---|
[14716] | 27 | from kofacustom.dspg.payments.interfaces import ICustomOnlinePayment |
---|
| 28 | from kofacustom.dspg.interfaces import MessageFactory as _ |
---|
[10765] | 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 | |
---|
[16817] | 67 | total_credits_s1 = schema.Int( |
---|
| 68 | title = _(u'1st Semester Credits'), |
---|
| 69 | required = False, |
---|
| 70 | ) |
---|
| 71 | |
---|
| 72 | total_credits_s2 = schema.Int( |
---|
| 73 | title = _(u'2nd Semester Credits'), |
---|
| 74 | required = False, |
---|
| 75 | ) |
---|
| 76 | |
---|
| 77 | total_credits = schema.Int( |
---|
| 78 | title = _(u'Total Credits'), |
---|
| 79 | required = False, |
---|
| 80 | ) |
---|
| 81 | |
---|
[10765] | 82 | class ICustomStudentOnlinePayment(ICustomOnlinePayment): |
---|
| 83 | """A student payment via payment gateways. |
---|
| 84 | |
---|
| 85 | This Interface does not inherit from IStudentOnlinePayment. |
---|
| 86 | Thus all fields from IStudentOnlinePayment have to be repeated here. |
---|
| 87 | """ |
---|
| 88 | |
---|
| 89 | p_current = schema.Bool( |
---|
| 90 | title = _(u'Current Session Payment'), |
---|
| 91 | default = True, |
---|
| 92 | required = False, |
---|
| 93 | ) |
---|
| 94 | |
---|
[13740] | 95 | p_level = schema.Choice( |
---|
[10765] | 96 | title = _(u'Payment Level'), |
---|
[13740] | 97 | source = StudyLevelSource(), |
---|
[10765] | 98 | required = False, |
---|
| 99 | ) |
---|
| 100 | |
---|
| 101 | ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[ |
---|
| 102 | 'p_session'].order |
---|
| 103 | |
---|
| 104 | class ICustomCourseTicket(INigeriaCourseTicket): |
---|
| 105 | """A course ticket. |
---|
| 106 | |
---|
| 107 | """ |
---|
| 108 | |
---|
| 109 | class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo): |
---|
| 110 | """Representation of a student. Skip regular reg_number validation. |
---|
| 111 | |
---|
| 112 | """ |
---|
| 113 | |
---|
| 114 | class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo): |
---|
| 115 | """Representation of a student. Skip regular matric_number validation. |
---|
| 116 | |
---|
| 117 | """ |
---|