1 | ## $Id: interfaces.py 11683 2014-06-11 14:38:25Z henrik $
|
---|
2 | ##
|
---|
3 | ## Copyright (C) 2011 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 |
|
---|
19 | import zope.i18nmessageid
|
---|
20 | from zope import schema
|
---|
21 | from zc.sourcefactory.basic import BasicSourceFactory
|
---|
22 | from waeup.kofa.interfaces import (SimpleKofaVocabulary,
|
---|
23 | ISessionConfiguration, academic_sessions_vocab)
|
---|
24 |
|
---|
25 | _ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.kwarapoly')
|
---|
26 |
|
---|
27 | # It's recommended to replicate all fields from the base package here.
|
---|
28 | class ICustomSessionConfiguration(ISessionConfiguration):
|
---|
29 | """A session configuration object.
|
---|
30 | """
|
---|
31 |
|
---|
32 | # Base fees, do not remove.
|
---|
33 |
|
---|
34 | school_fee_base = schema.Float(
|
---|
35 | title = _(u'School Fee (ignored)'),
|
---|
36 | default = 0.0,
|
---|
37 | required = True,
|
---|
38 | )
|
---|
39 |
|
---|
40 | application_fee = schema.Float(
|
---|
41 | title = _(u'Application Fee (fallback)'),
|
---|
42 | default = 0.0,
|
---|
43 | required = True,
|
---|
44 | )
|
---|
45 |
|
---|
46 | clearance_fee = schema.Float(
|
---|
47 | title = _(u'Clearance Fee'),
|
---|
48 | default = 0.0,
|
---|
49 | required = True,
|
---|
50 | )
|
---|
51 |
|
---|
52 | booking_fee = schema.Float(
|
---|
53 | title = _(u'Booking Fee'),
|
---|
54 | default = 0.0,
|
---|
55 | required = True,
|
---|
56 | )
|
---|
57 |
|
---|
58 | # Additional fees in custom package
|
---|
59 |
|
---|
60 | maint_fee = schema.Float(
|
---|
61 | title = _(u'Maintenance Fee (fallback)'),
|
---|
62 | default = 0.0,
|
---|
63 | required = True,
|
---|
64 | )
|
---|
65 | gown_fee = schema.Float(
|
---|
66 | title = _(u'Gown Fee'),
|
---|
67 | default = 0.0,
|
---|
68 | required = True,
|
---|
69 | )
|
---|
70 | transfer_fee = schema.Float(
|
---|
71 | title = _(u'Transfer Fee'),
|
---|
72 | default = 0.0,
|
---|
73 | required = True,
|
---|
74 | )
|
---|
75 | certificate_fee = schema.Float(
|
---|
76 | title = _(u'ND Certificate Fee'),
|
---|
77 | default = 0.0,
|
---|
78 | required = True,
|
---|
79 | )
|
---|
80 | hnd_certificate_fee = schema.Float(
|
---|
81 | title = _(u'HND Certificate Fee'),
|
---|
82 | default = 0.0,
|
---|
83 | required = True,
|
---|
84 | )
|
---|
85 | pgd_certificate_fee = schema.Float(
|
---|
86 | title = _(u'PGD Certificate Fee'),
|
---|
87 | default = 0.0,
|
---|
88 | required = True,
|
---|
89 | )
|
---|
90 | state_result_fee = schema.Float(
|
---|
91 | title = _(u'ND Statement of Result Fee'),
|
---|
92 | default = 0.0,
|
---|
93 | required = True,
|
---|
94 | )
|
---|
95 | hnd_state_result_fee = schema.Float(
|
---|
96 | title = _(u'HND Statement of Result Fee'),
|
---|
97 | default = 0.0,
|
---|
98 | required = True,
|
---|
99 | )
|
---|
100 | pgd_state_result_fee = schema.Float(
|
---|
101 | title = _(u'PGD Statement of Result Fee'),
|
---|
102 | default = 0.0,
|
---|
103 | required = True,
|
---|
104 | )
|
---|
105 | transcript_local_fee = schema.Float(
|
---|
106 | title = _(u'ND Transcript (local) Fee'),
|
---|
107 | default = 0.0,
|
---|
108 | required = True,
|
---|
109 | )
|
---|
110 | hnd_transcript_local_fee = schema.Float(
|
---|
111 | title = _(u'HND Transcript (local) Fee'),
|
---|
112 | default = 0.0,
|
---|
113 | required = True,
|
---|
114 | )
|
---|
115 | transcript_foreign_fee = schema.Float(
|
---|
116 | title = _(u'ND Transcript (foreign) Fee'),
|
---|
117 | default = 0.0,
|
---|
118 | required = True,
|
---|
119 | )
|
---|
120 | hnd_transcript_foreign_fee = schema.Float(
|
---|
121 | title = _(u'HND Transcript (foreign) Fee'),
|
---|
122 | default = 0.0,
|
---|
123 | required = True,
|
---|
124 | )
|
---|
125 | ver_result_fee = schema.Float(
|
---|
126 | title = _(u'Verification of Result Fee'),
|
---|
127 | default = 0.0,
|
---|
128 | required = True,
|
---|
129 | )
|
---|
130 | change_course_fee = schema.Float(
|
---|
131 | title = _(u'Change of Course Fee'),
|
---|
132 | default = 0.0,
|
---|
133 | required = True,
|
---|
134 | )
|
---|
135 | change_inst_fee = schema.Float(
|
---|
136 | title = _(u'Change of Institute Fee'),
|
---|
137 | default = 0.0,
|
---|
138 | required = True,
|
---|
139 | )
|
---|
140 | jamb_reject_fee = schema.Float(
|
---|
141 | title = _(u'JAMB Rejection Form Fee'),
|
---|
142 | default = 0.0,
|
---|
143 | required = True,
|
---|
144 | )
|
---|
145 | cert_of_cert_fee = schema.Float(
|
---|
146 | title = _(u'Certification of Certificate Fee'),
|
---|
147 | default = 0.0,
|
---|
148 | required = True,
|
---|
149 | )
|
---|
150 | ref_let_fee = schema.Float(
|
---|
151 | title = _(u'Recommendation/Reference Letter Fee'),
|
---|
152 | default = 0.0,
|
---|
153 | required = True,
|
---|
154 | )
|
---|
155 | proc_cert_fee = schema.Float(
|
---|
156 | title = _(u'Processing of Certificate by Proxy Fee'),
|
---|
157 | default = 0.0,
|
---|
158 | required = True,
|
---|
159 | )
|
---|
160 | loss_idcard_fee = schema.Float(
|
---|
161 | title = _(u'Loss of ID Card Fee (student)'),
|
---|
162 | default = 0.0,
|
---|
163 | required = True,
|
---|
164 | )
|
---|
165 | staff_loss_idcard_fee = schema.Float(
|
---|
166 | title = _(u'Loss of ID Card Fee (staff)'),
|
---|
167 | default = 0.0,
|
---|
168 | required = True,
|
---|
169 | )
|
---|
170 | loss_examcard_fee = schema.Float(
|
---|
171 | title = _(u'Loss of Exam Card Fee'),
|
---|
172 | default = 0.0,
|
---|
173 | required = True,
|
---|
174 | )
|
---|
175 | loss_result_fee = schema.Float(
|
---|
176 | title = _(u'Loss of Result Fee'),
|
---|
177 | default = 0.0,
|
---|
178 | required = True,
|
---|
179 | )
|
---|
180 | loss_receipt_fee = schema.Float(
|
---|
181 | title = _(u'Loss of Receipt Fee'),
|
---|
182 | default = 0.0,
|
---|
183 | required = True,
|
---|
184 | )
|
---|
185 | loss_clearance_fee = schema.Float(
|
---|
186 | title = _(u'Loss of Clearance Fee'),
|
---|
187 | default = 0.0,
|
---|
188 | required = True,
|
---|
189 | )
|
---|
190 | conv_brochure_fee = schema.Float(
|
---|
191 | title = _(u'ND Convocation Brochure Fee'),
|
---|
192 | default = 0.0,
|
---|
193 | required = True,
|
---|
194 | )
|
---|
195 | hnd_conv_brochure_fee = schema.Float(
|
---|
196 | title = _(u'HND Convocation Brochure Fee'),
|
---|
197 | default = 0.0,
|
---|
198 | required = True,
|
---|
199 | )
|
---|
200 | pgd_conv_brochure_fee = schema.Float(
|
---|
201 | title = _(u'PGD Convocation Brochure Fee'),
|
---|
202 | default = 0.0,
|
---|
203 | required = True,
|
---|
204 | )
|
---|
205 | penalty_ug = schema.Float(
|
---|
206 | title = _(u'UG Penalty Fee'),
|
---|
207 | default = 0.0,
|
---|
208 | required = True,
|
---|
209 | )
|
---|
210 | penalty_pg = schema.Float(
|
---|
211 | title = _(u'PG Penalty Fee'),
|
---|
212 | default = 0.0,
|
---|
213 | required = True,
|
---|
214 | )
|
---|
215 |
|
---|
216 | def getSessionString():
|
---|
217 | """Returns the session string from the vocabulary.
|
---|
218 | """
|
---|
219 |
|
---|
220 |
|
---|
221 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration):
|
---|
222 | """A session configuration object in add mode.
|
---|
223 | """
|
---|
224 |
|
---|
225 | academic_session = schema.Choice(
|
---|
226 | title = _(u'Academic Session'),
|
---|
227 | source = academic_sessions_vocab,
|
---|
228 | default = None,
|
---|
229 | required = True,
|
---|
230 | readonly = False,
|
---|
231 | )
|
---|
232 |
|
---|
233 | ICustomSessionConfigurationAdd[
|
---|
234 | 'academic_session'].order = ICustomSessionConfiguration[
|
---|
235 | 'academic_session'].order |
---|