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

Last change on this file since 17383 was 17363, checked in by Henrik Bettermann, 20 months ago

Add two fields.

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