## $Id: interfaces.py 7822 2012-03-09 07:26:31Z 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.schema import TextLineChoice from waeup.kofa.interfaces import SimpleKofaVocabulary from waeup.kofa.students.interfaces import ( IStudentBase,IStudentClearance,IStudentPersonal,IStudentNavigation, ) from waeup.kofa.students.vocabularies import ( lgas_vocab, nats_vocab, contextual_reg_num_source) class IStudentBase(IStudentBase): """Representation of student base data. """ reg_number = TextLineChoice( title = u'Registration Number', required = False, readonly = False, source = contextual_reg_num_source, ) class IStudentPersonal(IStudentPersonal): """Student personal data. """ marit_stat = schema.Choice( title = u'Maritual Status', default = 'unmarried', required = False, vocabulary = SimpleKofaVocabulary( ('Unmarried', 'unmarried'), ('Married', 'married'),) ) class IStudentClearance(IStudentClearance): """Representation of student clearance data. """ date_of_birth = schema.Date( title = u'Date of Birth', required = False, ) nationality = schema.Choice( source = nats_vocab, title = u'Nationality', default = 'nigeria', required = False, ) lga = schema.Choice( source = lgas_vocab, title = u'State/LGA', required = False, ) class IStudent(IStudentBase,IStudentClearance,IStudentPersonal): """Representation of a student. """ # Interfaces for students only class IStudentClearanceEdit(IStudentClearance): """Interface needed for restricted editing of student clearance data. """ class IStudentPersonalEdit(IStudentPersonal): """Interface needed for restricted editing of student personal data. """