source: main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/interfaces.py @ 17421

Last change on this file since 17421 was 16817, checked in by Henrik Bettermann, 3 years ago

Show semester credits on study level pages.

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1## $Id: interfaces.py 16817 2022-02-17 09:09:52Z 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 kofacustom.nigeria.students.interfaces import (
22    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
23    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
24    INigeriaStudentStudyCourse, INigeriaCourseTicket,
25    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
26    )
27from kofacustom.dspg.payments.interfaces import ICustomOnlinePayment
28from kofacustom.dspg.interfaces import MessageFactory as _
29
30class ICustomStudentBase(INigeriaStudentBase):
31    """Representation of student base data.
32
33    """
34
35class ICustomStudentPersonal(INigeriaStudentPersonal):
36    """Student personal data.
37
38    """
39
40class ICustomUGStudentClearance(INigeriaUGStudentClearance):
41    """Representation of ug student clearance data.
42
43    """
44
45class ICustomPGStudentClearance(INigeriaPGStudentClearance):
46    """Representation of pg student clearance data.
47
48    """
49
50
51class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
52    ICustomPGStudentClearance,ICustomStudentPersonal):
53    """Representation of a student.
54
55    """
56
57class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
58    """A container for student study levels.
59
60    """
61
62class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
63    """A container for course tickets.
64
65    """
66
67    total_credits_s1 = schema.Int(
68        title = _(u'1st Semester Credits'),
69        required = False,
70        )
71
72    total_credits_s2 = schema.Int(
73        title = _(u'2nd Semester Credits'),
74        required = False,
75        )
76
77    total_credits = schema.Int(
78        title = _(u'Total Credits'),
79        required = False,
80        )
81
82class ICustomStudentOnlinePayment(ICustomOnlinePayment):
83    """A student payment via payment gateways.
84
85    This Interface does not inherit from IStudentOnlinePayment.
86    Thus all fields from IStudentOnlinePayment have to be repeated here.
87    """
88
89    p_current = schema.Bool(
90        title = _(u'Current Session Payment'),
91        default = True,
92        required = False,
93        )
94
95    p_level = schema.Choice(
96        title = _(u'Payment Level'),
97        source = StudyLevelSource(),
98        required = False,
99        )
100
101ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
102    'p_session'].order
103
104class ICustomCourseTicket(INigeriaCourseTicket):
105    """A course ticket.
106
107    """
108
109class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
110    """Representation of a student. Skip regular reg_number validation.
111
112    """
113
114class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
115    """Representation of a student. Skip regular matric_number validation.
116
117    """
Note: See TracBrowser for help on using the repository browser.