source: main/kofacustom.skeleton/trunk/src/kofacustom/skeleton/applicants/interfaces.py @ 15269

Last change on this file since 15269 was 10765, checked in by Henrik Bettermann, 11 years ago

Fill trunk.

  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1## $Id: interfaces.py 10765 2013-11-19 12:57: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"""Customized interfaces of the university application package.
19"""
20
21from zope import schema
22from waeup.kofa.applicants.interfaces import (
23    IApplicantBaseData,
24    AppCatCertificateSource, CertificateSource)
25from waeup.kofa.schoolgrades import ResultEntryField
26from waeup.kofa.interfaces import (
27    SimpleKofaVocabulary, academic_sessions_vocab, validate_email)
28from waeup.kofa.schema import FormattedDate, TextLineChoice
29from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
30from waeup.kofa.applicants.interfaces import contextual_reg_num_source
31from kofacustom.nigeria.applicants.interfaces import (
32    LGASource, high_qual, high_grade, exam_types,
33    INigeriaUGApplicant, INigeriaPGApplicant,
34    INigeriaApplicantOnlinePayment,
35    INigeriaUGApplicantEdit, INigeriaPGApplicantEdit,
36    INigeriaApplicantUpdateByRegNo,
37    IPUTMEApplicantEdit,
38    )
39from kofacustom.skeleton.interfaces import MessageFactory as _
40from kofacustom.skeleton.payments.interfaces import ICustomOnlinePayment
41
42class ICustomUGApplicant(INigeriaUGApplicant):
43    """An undergraduate applicant.
44
45    This interface defines the least common multiple of all fields
46    in ug application forms. In customized forms, fields can be excluded by
47    adding them to the UG_OMIT* tuples.
48    """
49
50class ICustomPGApplicant(INigeriaPGApplicant):
51    """A postgraduate applicant.
52
53    This interface defines the least common multiple of all fields
54    in pg application forms. In customized forms, fields can be excluded by
55    adding them to the PG_OMIT* tuples.
56    """
57
58
59class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant):
60    """An interface for both types of applicants.
61
62    Attention: The ICustomPGApplicant field seetings will be overwritten
63    by ICustomPGApplicant field settings. If a field is defined
64    in both interfaces zope.schema validates only against the
65    constraints in ICustomUGApplicant. This does not affect the forms
66    since they are build on either ICustomUGApplicant or ICustomPGApplicant.
67    """
68
69    def writeLogMessage(view, comment):
70        """Adds an INFO message to the log file
71        """
72
73    def createStudent():
74        """Create a student object from applicant data
75        and copy applicant object.
76        """
77
78class ICustomUGApplicantEdit(INigeriaUGApplicantEdit):
79    """An undergraduate applicant interface for edit forms.
80
81    Here we can repeat the fields from base data and set the
82    `required` and `readonly` attributes to True to further restrict
83    the data access. Or we can allow only certain certificates to be
84    selected by choosing the appropriate source.
85
86    We cannot omit fields here. This has to be done in the
87    respective form page.
88    """
89
90class ICustomPGApplicantEdit(INigeriaPGApplicantEdit):
91    """A postgraduate applicant interface for editing.
92
93    Here we can repeat the fields from base data and set the
94    `required` and `readonly` attributes to True to further restrict
95    the data access. Or we can allow only certain certificates to be
96    selected by choosing the appropriate source.
97
98    We cannot omit fields here. This has to be done in the
99    respective form page.
100    """
101
102class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment):
103    """An applicant payment via payment gateways.
104
105    """
106
107class IPUTMEApplicantEdit(IPUTMEApplicantEdit):
108    """An undergraduate applicant interface for editing.
109
110    Here we can repeat the fields from base data and set the
111    `required` and `readonly` attributes to True to further restrict
112    the data access. Or we can allow only certain certificates to be
113    selected by choosing the appropriate source.
114
115    We cannot omit fields here. This has to be done in the
116    respective form page.
117    """
118
119class ICustomApplicantUpdateByRegNo(INigeriaApplicantUpdateByRegNo):
120    """Representation of an applicant.
121
122    Skip regular reg_number validation if reg_number is used for finding
123    the applicant object.
124    """
Note: See TracBrowser for help on using the repository browser.