[10765] | 1 | ## $Id: applicant.py 16273 2020-10-09 07:07:15Z 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 |
---|
[15878] | 21 | from zope.component import getUtility |
---|
| 22 | from waeup.kofa.interfaces import IExtFileStore |
---|
[10765] | 23 | from waeup.kofa.applicants.applicant import ApplicantFactory |
---|
[16062] | 24 | from waeup.kofa.applicants.refereereport import ( |
---|
| 25 | ApplicantRefereeReport, ApplicantRefereeReportFactory) |
---|
[10765] | 26 | from waeup.kofa.utils.helpers import attrs_to_fields |
---|
| 27 | from kofacustom.nigeria.applicants.applicant import NigeriaApplicant |
---|
[15563] | 28 | from kofacustom.iuokada.applicants.interfaces import( |
---|
[16062] | 29 | ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, |
---|
[16142] | 30 | IPUTMEApplicantEdit, ICustomApplicantRefereeReport, ITranscriptApplicant) |
---|
[10765] | 31 | |
---|
| 32 | class CustomApplicant(NigeriaApplicant): |
---|
| 33 | |
---|
| 34 | grok.implements(ICustomApplicant, ICustomUGApplicantEdit, |
---|
[16142] | 35 | ICustomPGApplicantEdit, IPUTMEApplicantEdit, ITranscriptApplicant) |
---|
[10765] | 36 | grok.provides(ICustomApplicant) |
---|
| 37 | |
---|
[16273] | 38 | applicant_student_mapping = NigeriaApplicant.applicant_student_mapping + [ |
---|
| 39 | ('lga', 'lga'), |
---|
| 40 | ('nationality', 'nationality'), |
---|
| 41 | ('fst_sit_fname', 'fst_sit_fname'), |
---|
| 42 | ('fst_sit_no', 'fst_sit_no'), |
---|
| 43 | ('fst_sit_date', 'fst_sit_date'), |
---|
| 44 | ('fst_sit_type', 'fst_sit_type'), |
---|
| 45 | ('fst_sit_results', 'fst_sit_results'), |
---|
| 46 | ('scd_sit_fname', 'scd_sit_fname'), |
---|
| 47 | ('scd_sit_no', 'scd_sit_no'), |
---|
| 48 | ('scd_sit_date', 'scd_sit_date'), |
---|
| 49 | ('scd_sit_type', 'scd_sit_type'), |
---|
| 50 | ('scd_sit_results', 'scd_sit_results'), |
---|
| 51 | ('hq_type', 'hq_type'), |
---|
| 52 | ('hq_fname', 'hq_fname'), |
---|
| 53 | ('hq_matric_no', 'hq_matric_no'), |
---|
| 54 | ('hq_degree', 'hq_degree'), |
---|
| 55 | ('hq_school', 'hq_school'), |
---|
| 56 | ('hq_session', 'hq_session'), |
---|
| 57 | ('hq_disc', 'hq_disc'), |
---|
| 58 | # added |
---|
| 59 | ('sponsor', 'sponsor'), |
---|
| 60 | ] |
---|
| 61 | |
---|
[10765] | 62 | CustomApplicant = attrs_to_fields(CustomApplicant) |
---|
| 63 | |
---|
| 64 | class CustomApplicantFactory(ApplicantFactory): |
---|
| 65 | """A factory for customized applicants. |
---|
| 66 | """ |
---|
| 67 | |
---|
| 68 | def __call__(self, *args, **kw): |
---|
| 69 | return CustomApplicant() |
---|
| 70 | |
---|
| 71 | def getInterfaces(self): |
---|
| 72 | return implementedBy(CustomApplicant) |
---|
[16062] | 73 | |
---|
| 74 | class CustomApplicantRefereeReport(ApplicantRefereeReport): |
---|
| 75 | """This is a custom referee report. |
---|
| 76 | """ |
---|
| 77 | grok.implements(ICustomApplicantRefereeReport) |
---|
| 78 | grok.provides(ICustomApplicantRefereeReport) |
---|
| 79 | |
---|
| 80 | CustomApplicantRefereeReport = attrs_to_fields(CustomApplicantRefereeReport) |
---|
| 81 | |
---|
| 82 | class CustomApplicantRefereeReportFactory(ApplicantRefereeReportFactory): |
---|
| 83 | """A factory for applicant online payments. |
---|
| 84 | """ |
---|
| 85 | |
---|
| 86 | def __call__(self, *args, **kw): |
---|
| 87 | return CustomApplicantRefereeReport() |
---|
| 88 | |
---|
| 89 | def getInterfaces(self): |
---|
| 90 | return implementedBy(CustomApplicantRefereeReport) |
---|
| 91 | |
---|