source: main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py @ 10222

Last change on this file since 10222 was 10102, checked in by Henrik Bettermann, 12 years ago

Changes requested in ticket #59.

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