## $Id: interfaces.py 7525 2012-01-27 18:24: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.sirp.interfaces import SimpleSIRPVocabulary from waeup.sirp.students.interfaces import ( IStudentBase,IStudentClearance,IStudentPersonal,IStudentNavigation, ) from waeup.sirp.students.vocabularies import lgas_vocab, nats_vocab class IStudentPersonal(IStudentPersonal): """Student personal data. """ perm_address = schema.Text( title = u'Permanent Address', required = False, ) marit_stat = schema.Choice( title = u'Maritual Status', default = 'unmarried', required = False, vocabulary = SimpleSIRPVocabulary( ('Unmarried', 'unmarried'), ('Married', 'married'),) ) class IStudentClearance(IStudentClearance): """Representation of student clearance data. """ date_of_birth = schema.Date( title = u'Date of Birth', required = False, ) clearance_locked = schema.Bool( title = u'Clearance form locked', default = False, ) clr_code = schema.TextLine( title = u'CLR Activation Code', default = u'', required = False, readonly = True, ) 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. """