source: main/waeup.imostate/src/waeup/imostate/applicants/interfaces.py @ 10364

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

Remove futminna customizations which are not applicable here.

  • Property svn:keywords set to Id
File size: 3.1 KB
RevLine 
[10340]1## $Id: interfaces.py 10350 2013-06-22 21:39:00Z 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 zope.interface import Attribute, invariant, Invalid
23from waeup.kofa.applicants.interfaces import (
24    IApplicantBaseData,
25    AppCatCertificateSource, CertificateSource)
26from waeup.kofa.students.vocabularies import nats_vocab
27from kofacustom.nigeria.applicants.interfaces import (
28    LGASource,
29    high_qual, high_grade, exam_types,
30    INigeriaUGApplicant,
31    INigeriaApplicantOnlinePayment,
32    INigeriaUGApplicantEdit, INigeriaPGApplicantEdit,
33    INigeriaApplicantUpdateByRegNo,
34    )
35
36from waeup.imostate.interfaces import MessageFactory as _
37
[10350]38class ICustomUGApplicant(INigeriaUGApplicant):
[10340]39    """An undergraduate applicant.
40
41    This interface defines the least common multiple of all fields
42    in ug application forms. In customized forms, fields can be excluded by
43    adding them to the UG_OMIT* tuples.
44    """
45
[10350]46class ICustomApplicant(ICustomUGApplicant):
[10340]47    """An interface for both types of applicants.
48
49    Attention: The ICustomPGApplicant field seetings will be overwritten
50    by ICustomPGApplicant field settings. If a field is defined
51    in both interfaces zope.schema validates only against the
52    constraints in ICustomUGApplicant. This does not affect the forms
53    since they are build on either ICustomUGApplicant or ICustomPGApplicant.
54    """
55
56    def writeLogMessage(view, comment):
57        """Adds an INFO message to the log file
58        """
59
60    def createStudent():
61        """Create a student object from applicatnt data
62        and copy applicant object.
63        """
64
65class ICustomUGApplicantEdit(ICustomUGApplicant):
66    """An undergraduate applicant interface for edit forms.
67
68    Here we can repeat the fields from base data and set the
69    `required` and `readonly` attributes to True to further restrict
70    the data access. Or we can allow only certain certificates to be
71    selected by choosing the appropriate source.
72
73    We cannot omit fields here. This has to be done in the
74    respective form page.
75    """
76
77
78class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment):
79    """An applicant payment via payment gateways.
80
81    """
82
83class ICustomApplicantUpdateByRegNo(INigeriaApplicantUpdateByRegNo):
84    """Representation of an applicant.
85
86    Skip regular reg_number validation if reg_number is used for finding
87    the applicant object.
88    """
89
Note: See TracBrowser for help on using the repository browser.