1 | ## $Id: applicant.py 16274 2020-10-09 07:09:21Z henrik $ |
---|
2 | ## |
---|
3 | ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann |
---|
4 | ## This program is free software; you can redistribute it and/or modify |
---|
5 | ## it under the terms of the GNU General Public License as published by |
---|
6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
7 | ## (at your option) any later version. |
---|
8 | ## |
---|
9 | ## This program is distributed in the hope that it will be useful, |
---|
10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | ## GNU General Public License for more details. |
---|
13 | ## |
---|
14 | ## You should have received a copy of the GNU General Public License |
---|
15 | ## along with this program; if not, write to the Free Software |
---|
16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
17 | ## |
---|
18 | |
---|
19 | import grok |
---|
20 | from zope.interface import implementedBy |
---|
21 | from zope.component import getUtility |
---|
22 | from waeup.kofa.interfaces import IExtFileStore |
---|
23 | from waeup.kofa.applicants.applicant import ApplicantFactory |
---|
24 | from waeup.kofa.applicants.refereereport import ( |
---|
25 | ApplicantRefereeReport, ApplicantRefereeReportFactory) |
---|
26 | from waeup.kofa.utils.helpers import attrs_to_fields |
---|
27 | from kofacustom.nigeria.applicants.applicant import NigeriaApplicant |
---|
28 | from kofacustom.iuokada.applicants.interfaces import( |
---|
29 | ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, |
---|
30 | IPUTMEApplicantEdit, ICustomApplicantRefereeReport, ITranscriptApplicant) |
---|
31 | |
---|
32 | class CustomApplicant(NigeriaApplicant): |
---|
33 | |
---|
34 | grok.implements(ICustomApplicant, ICustomUGApplicantEdit, |
---|
35 | ICustomPGApplicantEdit, IPUTMEApplicantEdit, ITranscriptApplicant) |
---|
36 | grok.provides(ICustomApplicant) |
---|
37 | |
---|
38 | applicant_student_mapping = NigeriaApplicant.applicant_student_mapping + [ |
---|
39 | ('sponsor', 'sponsor'), |
---|
40 | ] |
---|
41 | |
---|
42 | CustomApplicant = attrs_to_fields(CustomApplicant) |
---|
43 | |
---|
44 | class CustomApplicantFactory(ApplicantFactory): |
---|
45 | """A factory for customized applicants. |
---|
46 | """ |
---|
47 | |
---|
48 | def __call__(self, *args, **kw): |
---|
49 | return CustomApplicant() |
---|
50 | |
---|
51 | def getInterfaces(self): |
---|
52 | return implementedBy(CustomApplicant) |
---|
53 | |
---|
54 | class CustomApplicantRefereeReport(ApplicantRefereeReport): |
---|
55 | """This is a custom referee report. |
---|
56 | """ |
---|
57 | grok.implements(ICustomApplicantRefereeReport) |
---|
58 | grok.provides(ICustomApplicantRefereeReport) |
---|
59 | |
---|
60 | CustomApplicantRefereeReport = attrs_to_fields(CustomApplicantRefereeReport) |
---|
61 | |
---|
62 | class CustomApplicantRefereeReportFactory(ApplicantRefereeReportFactory): |
---|
63 | """A factory for applicant online payments. |
---|
64 | """ |
---|
65 | |
---|
66 | def __call__(self, *args, **kw): |
---|
67 | return CustomApplicantRefereeReport() |
---|
68 | |
---|
69 | def getInterfaces(self): |
---|
70 | return implementedBy(CustomApplicantRefereeReport) |
---|
71 | |
---|