source: main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/interfaces.py @ 17397

Last change on this file since 17397 was 17025, checked in by Henrik Bettermann, 2 years ago

Add continuous assessment (ca) field.

  • Property svn:keywords set to Id
File size: 4.5 KB
Line 
1## $Id: interfaces.py 17025 2022-07-17 08:50:14Z 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.unidel.payments.interfaces import ICustomOnlinePayment
29from kofacustom.unidel.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
68    total_credits_s1 = schema.Int(
69        title = _(u'1st Semester Credits'),
70        required = False,
71        )
72
73    total_credits_s2 = schema.Int(
74        title = _(u'2nd Semester Credits'),
75        required = False,
76        )
77
78    total_credits = schema.Int(
79        title = _(u'Total Credits'),
80        required = False,
81        )
82
83class ICustomStudentOnlinePayment(ICustomOnlinePayment):
84    """A student payment via payment gateways.
85
86    This Interface does not inherit from IStudentOnlinePayment.
87    Thus all fields from IStudentOnlinePayment have to be repeated here.
88    """
89
90    p_current = schema.Bool(
91        title = _(u'Current Session Payment'),
92        default = True,
93        required = False,
94        )
95
96    p_level = schema.Choice(
97        title = _(u'Payment Level'),
98        source = StudyLevelSource(),
99        required = False,
100        )
101
102ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
103    'p_session'].order
104
105class ICustomCourseTicket(INigeriaCourseTicket):
106    """A course ticket.
107
108    """
109
110    score = schema.Int(
111        title = _(u'Score'),
112        required = False,
113        readonly = False,
114        max = 100,
115        )
116
117    ca = schema.Int(
118        title = _(u'CA'),
119        default = None,
120        required = False,
121        missing_value = None,
122        max = 90,
123        )
124
125ICustomCourseTicket['score'].order = INigeriaCourseTicket['score'].order
126ICustomCourseTicket['ca'].order = ICustomCourseTicket['score'].order
127
128class ICustomCourseTicketImport(ICustomCourseTicket):
129    """An interface for importing course results and nothing more.
130    """
131   
132    score = schema.Int(
133        title = _(u'Score'),
134        required = False,
135        readonly = False,
136        max = 100,
137        )
138
139    ca = schema.Int(
140        title = _(u'CA'),
141        required = False,
142        readonly = False,
143        max = 90,
144        )
145
146    level_session = schema.Choice(
147        title = _(u'Level Session'),
148        source = academic_sessions_vocab,
149        required = False,
150        readonly = False,
151        )
152
153
154class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
155    """Representation of a student. Skip regular reg_number validation.
156
157    """
158
159class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
160    """Representation of a student. Skip regular matric_number validation.
161
162    """
Note: See TracBrowser for help on using the repository browser.