1 | ## |
---|
2 | ## interfaces.py |
---|
3 | ## Login : <uli@pu.smp.net> |
---|
4 | ## Started on Sun Jun 27 11:06:23 2010 Uli Fouquet |
---|
5 | ## $Id$ |
---|
6 | ## |
---|
7 | ## Copyright (C) 2010 Uli Fouquet |
---|
8 | ## This program is free software; you can redistribute it and/or modify |
---|
9 | ## it under the terms of the GNU General Public License as published by |
---|
10 | ## the Free Software Foundation; either version 2 of the License, or |
---|
11 | ## (at your option) any later version. |
---|
12 | ## |
---|
13 | ## This program is distributed in the hope that it will be useful, |
---|
14 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | ## GNU General Public License for more details. |
---|
17 | ## |
---|
18 | ## You should have received a copy of the GNU General Public License |
---|
19 | ## along with this program; if not, write to the Free Software |
---|
20 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
21 | ## |
---|
22 | """Interfaces for JAMB data tables and related components. |
---|
23 | """ |
---|
24 | import os |
---|
25 | import waeup.sirp.browser |
---|
26 | from hurry.file import HurryFile |
---|
27 | from zc.sourcefactory.basic import BasicSourceFactory |
---|
28 | from zope import schema |
---|
29 | from zope.app.file.interfaces import IImage |
---|
30 | from zope.interface import Interface, Attribute |
---|
31 | from zope.pluggableauth.interfaces import IPrincipalInfo |
---|
32 | from zope.security.interfaces import IGroupClosureAwarePrincipal as IPrincipal |
---|
33 | from waeup.sirp.interfaces import IWAeUPObject |
---|
34 | from waeup.sirp.image.schema import ImageFile |
---|
35 | from waeup.sirp.applicants.interfaces import IApplicantBaseData |
---|
36 | |
---|
37 | |
---|
38 | class IJAMBDataRoot(IWAeUPObject): |
---|
39 | """A container that holds JAMB data tables. |
---|
40 | """ |
---|
41 | |
---|
42 | class IApplicantPDEImportData(IApplicantBaseData): |
---|
43 | """Data for applicants, that passed PDE screening. |
---|
44 | |
---|
45 | This data set should be suitable for imports from JAMB tables. It |
---|
46 | is also basicall the basic applicant data from |
---|
47 | :class:`IApplicantBaseData` only with the required fields set. |
---|
48 | |
---|
49 | """ |
---|
50 | firstname = schema.TextLine( |
---|
51 | title = u'First Name', |
---|
52 | required = True, |
---|
53 | ) |
---|
54 | middlenames = schema.TextLine( |
---|
55 | title = u'Middle Names', |
---|
56 | required = True, |
---|
57 | ) |
---|
58 | lastname = schema.TextLine( |
---|
59 | title = u'Surname/Full Name', |
---|
60 | required = True, |
---|
61 | ) |
---|
62 | date_of_birth = schema.Date( |
---|
63 | title = u'Date of Birth', |
---|
64 | required = True, |
---|
65 | ) |
---|
66 | jamb_state = schema.TextLine( |
---|
67 | title = u'State (provided by JAMB)', |
---|
68 | required = True, |
---|
69 | ) |
---|
70 | jamb_lga = schema.TextLine( |
---|
71 | title = u'LGA (provided by JAMB)', |
---|
72 | required = True, |
---|
73 | ) |
---|
74 | course1 = schema.TextLine( |
---|
75 | title = u'1st Choice Course of Study', |
---|
76 | required = True, |
---|
77 | ) |
---|
78 | screening_date = schema.Date( |
---|
79 | title = u'Screening Date', |
---|
80 | required = True, |
---|
81 | ) |
---|
82 | screening_type = schema.TextLine( |
---|
83 | # XXX: schould be choice |
---|
84 | title = u'Screening Type', |
---|
85 | required = True, |
---|
86 | ) |
---|
87 | screening_venue = schema.TextLine( |
---|
88 | title = u'Screening Venue', |
---|
89 | required = True, |
---|
90 | ) |
---|
91 | entry_session = schema.TextLine( |
---|
92 | # XXX: should be choice |
---|
93 | # XXX: should have sensible default: upcoming session |
---|
94 | title = u'Entry Session', |
---|
95 | required = True, |
---|
96 | ) |
---|