## ## interfaces.py ## Login : ## Started on Sun Jun 27 11:06:23 2010 Uli Fouquet ## $Id$ ## ## Copyright (C) 2010 Uli Fouquet ## 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 ## """Interfaces for JAMB data tables and related components. """ import os import waeup.sirp.browser from hurry.file import HurryFile from zc.sourcefactory.basic import BasicSourceFactory from zope import schema from zope.app.file.interfaces import IImage from zope.interface import Interface, Attribute from zope.pluggableauth.interfaces import IPrincipalInfo from zope.security.interfaces import IGroupClosureAwarePrincipal as IPrincipal from waeup.sirp.interfaces import IWAeUPObject from waeup.sirp.image.schema import ImageFile from waeup.sirp.applicants.interfaces import IApplicantBaseData class IJAMBDataRoot(IWAeUPObject): """A container that holds JAMB data tables. """ class IApplicantPDEImportData(IApplicantBaseData): """Data for applicants, that passed PDE screening. This data set should be suitable for imports from JAMB tables. It is also basicall the basic applicant data from :class:`IApplicantBaseData` only with the required fields set. """ firstname = schema.TextLine( title = u'First Name', required = True, ) middlenames = schema.TextLine( title = u'Middle Names', required = True, ) lastname = schema.TextLine( title = u'Surname/Full Name', required = True, ) date_of_birth = schema.Date( title = u'Date of Birth', required = True, ) jamb_state = schema.TextLine( title = u'State (provided by JAMB)', required = True, ) jamb_lga = schema.TextLine( title = u'LGA (provided by JAMB)', required = True, ) course1 = schema.TextLine( title = u'1st Choice Course of Study', required = True, ) screening_date = schema.Date( title = u'Screening Date', required = True, ) screening_type = schema.TextLine( # XXX: schould be choice title = u'Screening Type', required = True, ) screening_venue = schema.TextLine( title = u'Screening Venue', required = True, ) entry_session = schema.TextLine( # XXX: should be choice # XXX: should have sensible default: upcoming session title = u'Entry Session', required = True, )