source: main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/interfaces.py @ 17346

Last change on this file since 17346 was 17346, checked in by Henrik Bettermann, 19 months ago

Add new field also to importer.

  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
1## $Id: interfaces.py 17346 2023-03-10 09:39:10Z henrik $
2##
3## Copyright (C) 2012 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
19from zope import schema
20from waeup.kofa.students.vocabularies import StudyLevelSource
21from waeup.kofa.interfaces import (IKofaObject, academic_sessions_vocab)
22from kofacustom.nigeria.students.interfaces import (
23    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
24    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
25    INigeriaStudentStudyCourse, INigeriaCourseTicket,
26    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
27    )
28from kofacustom.edocons.payments.interfaces import ICustomOnlinePayment
29from kofacustom.edocons.interfaces import MessageFactory as _
30
31class ICustomStudentBase(INigeriaStudentBase):
32    """Representation of student base data.
33
34    """
35
36class ICustomStudentPersonal(INigeriaStudentPersonal):
37    """Student personal data.
38
39    """
40
41class ICustomUGStudentClearance(INigeriaUGStudentClearance):
42    """Representation of ug student clearance data.
43
44    """
45
46class ICustomPGStudentClearance(INigeriaPGStudentClearance):
47    """Representation of pg student clearance data.
48
49    """
50
51
52class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
53    ICustomPGStudentClearance,ICustomStudentPersonal):
54    """Representation of a student.
55
56    """
57
58class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
59    """A container for student study levels.
60
61    """
62
63class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
64    """A container for course tickets.
65
66    """
67
68class ICustomStudentOnlinePayment(ICustomOnlinePayment):
69    """A student payment via payment gateways.
70
71    This Interface does not inherit from IStudentOnlinePayment.
72    Thus all fields from IStudentOnlinePayment have to be repeated here.
73    """
74
75    p_current = schema.Bool(
76        title = _(u'Current Session Payment'),
77        default = True,
78        required = False,
79        )
80
81    p_level = schema.Choice(
82        title = _(u'Payment Level'),
83        source = StudyLevelSource(),
84        required = False,
85        )
86
87ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
88    'p_session'].order
89
90class ICustomCourseTicket(INigeriaCourseTicket):
91    """A course ticket.
92
93    """
94
95    carryover_score = schema.Int(
96        title = _(u'Carry-over Score'),
97        default = None,
98        required = False,
99        missing_value = None,
100        max = 100,
101        )
102
103ICustomCourseTicket['carryover_score'].order = ICustomCourseTicket['carry_over'].order
104
105class ICustomCourseTicketImport(ICustomCourseTicket):
106    """An interface for importing course results and nothing more.
107    """
108
109    score = schema.Int(
110        title = _(u'Score'),
111        required = False,
112        readonly = False,
113        )
114
115    level_session = schema.Choice(
116        title = _(u'Level Session'),
117        source = academic_sessions_vocab,
118        required = False,
119        readonly = False,
120        )
121
122    carryover_score = schema.Int(
123        title = _(u'Carry-over Score'),
124        default = None,
125        required = False,
126        missing_value = None,
127        max = 100,
128        )
129
130class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
131    """Representation of a student. Skip regular reg_number validation.
132
133    """
134
135class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
136    """Representation of a student. Skip regular matric_number validation.
137
138    """
Note: See TracBrowser for help on using the repository browser.