## $Id: interfaces.py 17737 2024-04-16 06:29:43Z henrik $ ## ## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## from zope import schema from waeup.kofa.interfaces import SimpleKofaVocabulary, academic_sessions_vocab from waeup.kofa.students.vocabularies import StudyLevelSource from waeup.kofa.students.interfaces import IStudentPersonal, IUGStudentClearance from kofacustom.nigeria.students.interfaces import ( INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance, INigeriaStudentPersonal, INigeriaStudentStudyLevel, INigeriaStudentStudyCourse, INigeriaCourseTicket, INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo, ) from kofacustom.udss.payments.interfaces import ICustomOnlinePayment from kofacustom.udss.interfaces import MessageFactory as _ class ICustomStudentBase(INigeriaStudentBase): """Representation of student base data. """ class ICustomStudentPersonal(IStudentPersonal): """Student personal data. """ religion = schema.Choice( title = u'Religion', default = 'no_say', required = False, vocabulary = SimpleKofaVocabulary( (_('Muslim'), 'muslim'), (_('Christian'), 'christian'), (_('Others'), 'others'), (_('Prefer not to say'), 'no_say'),) ) disabled = schema.Bool( title = u'Disabled', default = False, required = False, ) father_firstname = schema.TextLine( title = _(u'First Name of Father'), required = False, ) father_middlename = schema.TextLine( title = _(u'Middle Name of Father'), required = False, ) father_lastname = schema.TextLine( title = _(u'Last Name (Surname) of Father'), required = False, ) father_status = schema.TextLine( title = _(u'Father\'s Status and Rank'), required = False, ) father_employer = schema.TextLine( title = _(u'Father\'s Employer'), required = False, ) father_res_address = schema.Text( title = _(u'Father\'s Residential Address'), required = False, ) father_contact_address = schema.Text( title = _(u'Father\'s Contact Address (incl. P.O. Box)'), required = False, ) mother_firstname = schema.TextLine( title = _(u'First Name of Mother'), required = False, ) mother_middlename = schema.TextLine( title = _(u'Middle Name of Mother'), required = False, ) mother_lastname = schema.TextLine( title = _(u'Last Name (Surname) of Mother'), required = False, ) mother_status = schema.TextLine( title = _(u'Mother\'s Status and Rank'), required = False, ) mother_employer = schema.TextLine( title = _(u'Mother\'s Employer'), required = False, ) mother_res_address = schema.Text( title = _(u'Mother\'s Residential Address'), required = False, ) mother_contact_address = schema.Text( title = _(u'Mother\'s Contact Address (incl. P.O. Box)'), required = False, ) sponsor_firstname = schema.TextLine( title = _(u'First Name of sponsor'), required = False, ) sponsor_middlename = schema.TextLine( title = _(u'Middle Name of Sponsor'), required = False, ) sponsor_lastname = schema.TextLine( title = _(u'Last Name (Surname) of Sponsor'), required = False, ) sponsor_status = schema.TextLine( title = _(u'Sponsor\'s Status and Rank'), required = False, ) sponsor_employer = schema.TextLine( title = _(u'Sponsor\'s Employer'), required = False, ) sponsor_res_address = schema.Text( title = _(u'Sponsor\'s Residential Address'), required = False, ) sponsor_contact_address = schema.Text( title = _(u'Sponsor\'s Contact Address (incl. P.O. Box)'), required = False, ) class ICustomStudentClearance(IUGStudentClearance): """Representation of ug student clearance data. """ class ICustomStudent(ICustomStudentBase,ICustomStudentClearance, ICustomStudentPersonal): """Representation of a student. """ class ICustomStudentStudyCourse(INigeriaStudentStudyCourse): """A container for student study levels. """ class ICustomStudentStudyLevel(INigeriaStudentStudyLevel): """A container for course tickets. """ class ICustomStudentOnlinePayment(ICustomOnlinePayment): """A student payment via payment gateways. This Interface does not inherit from IStudentOnlinePayment. Thus all fields from IStudentOnlinePayment have to be repeated here. """ p_current = schema.Bool( title = _(u'Current Session Payment'), default = True, required = False, ) p_level = schema.Choice( title = _(u'Payment Level'), source = StudyLevelSource(), required = False, ) ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[ 'p_session'].order class ICustomCourseTicket(INigeriaCourseTicket): """A course ticket. """ class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo): """Representation of a student. Skip regular reg_number validation. """ class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo): """Representation of a student. Skip regular matric_number validation. """