1 | ## $Id: interfaces.py 14942 2018-01-22 22:48:02Z 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('kofacustom.dspg') |
---|
26 | |
---|
27 | class ICustomSessionConfiguration(ISessionConfiguration): |
---|
28 | """A session configuration object. |
---|
29 | """ |
---|
30 | |
---|
31 | # Base fees, do not remove. |
---|
32 | |
---|
33 | clearance_fee = schema.Float( |
---|
34 | title = _(u'Acceptance Fee'), |
---|
35 | default = 0.0, |
---|
36 | required = False, |
---|
37 | ) |
---|
38 | |
---|
39 | booking_fee = schema.Float( |
---|
40 | title = _(u'Bed Booking Fee'), |
---|
41 | default = 0.0, |
---|
42 | required = False, |
---|
43 | ) |
---|
44 | |
---|
45 | maint_fee = schema.Float( |
---|
46 | title = _(u'Rent (fallback)'), |
---|
47 | default = 0.0, |
---|
48 | required = False, |
---|
49 | ) |
---|
50 | |
---|
51 | late_registration_fee = schema.Float( |
---|
52 | title = _(u'Late Course Reg. Fee'), |
---|
53 | default = 0.0, |
---|
54 | required = False, |
---|
55 | ) |
---|
56 | |
---|
57 | transcript_fee = schema.Float( |
---|
58 | title = _(u'Transcript Fee'), |
---|
59 | default = 0.0, |
---|
60 | required = False, |
---|
61 | ) |
---|
62 | |
---|
63 | transfer_fee = schema.Float( |
---|
64 | title = _(u'Transfer Fee'), |
---|
65 | default = 0.0, |
---|
66 | required = False, |
---|
67 | ) |
---|
68 | |
---|
69 | |
---|
70 | # Additional fees in custom package |
---|
71 | |
---|
72 | gown_fee = schema.Float( |
---|
73 | title = _(u'Gown Fee'), |
---|
74 | default = 0.0, |
---|
75 | required = False, |
---|
76 | ) |
---|
77 | |
---|
78 | certificate_fee = schema.Float( |
---|
79 | title = _(u'ND Certificate Fee'), |
---|
80 | default = 0.0, |
---|
81 | required = True, |
---|
82 | ) |
---|
83 | hnd_certificate_fee = schema.Float( |
---|
84 | title = _(u'HND Certificate Fee'), |
---|
85 | default = 0.0, |
---|
86 | required = True, |
---|
87 | ) |
---|
88 | pgd_certificate_fee = schema.Float( |
---|
89 | title = _(u'PGD Certificate Fee'), |
---|
90 | default = 0.0, |
---|
91 | required = True, |
---|
92 | ) |
---|
93 | state_result_fee = schema.Float( |
---|
94 | title = _(u'ND Statement of Result Fee'), |
---|
95 | default = 0.0, |
---|
96 | required = True, |
---|
97 | ) |
---|
98 | hnd_state_result_fee = schema.Float( |
---|
99 | title = _(u'HND Statement of Result Fee'), |
---|
100 | default = 0.0, |
---|
101 | required = True, |
---|
102 | ) |
---|
103 | pgd_state_result_fee = schema.Float( |
---|
104 | title = _(u'PGD Statement of Result Fee'), |
---|
105 | default = 0.0, |
---|
106 | required = True, |
---|
107 | ) |
---|
108 | transcript_local_fee = schema.Float( |
---|
109 | title = _(u'ND Transcript (local) Fee'), |
---|
110 | default = 0.0, |
---|
111 | required = True, |
---|
112 | ) |
---|
113 | hnd_transcript_local_fee = schema.Float( |
---|
114 | title = _(u'HND Transcript (local) Fee'), |
---|
115 | default = 0.0, |
---|
116 | required = True, |
---|
117 | ) |
---|
118 | pgd_transcript_local_fee = schema.Float( |
---|
119 | title = _(u'PGD Transcript (local) Fee'), |
---|
120 | default = 0.0, |
---|
121 | required = True, |
---|
122 | ) |
---|
123 | transcript_foreign_fee = schema.Float( |
---|
124 | title = _(u'ND Transcript (foreign) Fee'), |
---|
125 | default = 0.0, |
---|
126 | required = True, |
---|
127 | ) |
---|
128 | hnd_transcript_foreign_fee = schema.Float( |
---|
129 | title = _(u'HND Transcript (foreign) Fee'), |
---|
130 | default = 0.0, |
---|
131 | required = True, |
---|
132 | ) |
---|
133 | pgd_transcript_foreign_fee = schema.Float( |
---|
134 | title = _(u'PGD Transcript (foreign) Fee'), |
---|
135 | default = 0.0, |
---|
136 | required = True, |
---|
137 | ) |
---|
138 | ver_result_fee = schema.Float( |
---|
139 | title = _(u'Verification of Result Fee'), |
---|
140 | default = 0.0, |
---|
141 | required = True, |
---|
142 | ) |
---|
143 | change_course_fee = schema.Float( |
---|
144 | title = _(u'Change of Course Fee'), |
---|
145 | default = 0.0, |
---|
146 | required = True, |
---|
147 | ) |
---|
148 | change_inst_fee = schema.Float( |
---|
149 | title = _(u'Change of Institute Fee'), |
---|
150 | default = 0.0, |
---|
151 | required = True, |
---|
152 | ) |
---|
153 | jamb_reject_fee = schema.Float( |
---|
154 | title = _(u'JAMB Rejection Form Fee'), |
---|
155 | default = 0.0, |
---|
156 | required = True, |
---|
157 | ) |
---|
158 | cert_of_cert_fee = schema.Float( |
---|
159 | title = _(u'Certification of Certificate Fee'), |
---|
160 | default = 0.0, |
---|
161 | required = True, |
---|
162 | ) |
---|
163 | ref_let_fee = schema.Float( |
---|
164 | title = _(u'Recommendation/Reference Letter Fee'), |
---|
165 | default = 0.0, |
---|
166 | required = True, |
---|
167 | ) |
---|
168 | proc_cert_fee = schema.Float( |
---|
169 | title = _(u'Processing of Certificate by Proxy Fee'), |
---|
170 | default = 0.0, |
---|
171 | required = True, |
---|
172 | ) |
---|
173 | loss_idcard_fee = schema.Float( |
---|
174 | title = _(u'Loss of ID Card Fee (student)'), |
---|
175 | default = 0.0, |
---|
176 | required = True, |
---|
177 | ) |
---|
178 | staff_loss_idcard_fee = schema.Float( |
---|
179 | title = _(u'Loss of ID Card Fee (staff)'), |
---|
180 | default = 0.0, |
---|
181 | required = True, |
---|
182 | ) |
---|
183 | loss_examcard_fee = schema.Float( |
---|
184 | title = _(u'Loss of Exam Card Fee'), |
---|
185 | default = 0.0, |
---|
186 | required = True, |
---|
187 | ) |
---|
188 | loss_result_fee = schema.Float( |
---|
189 | title = _(u'Loss of Result Fee'), |
---|
190 | default = 0.0, |
---|
191 | required = True, |
---|
192 | ) |
---|
193 | loss_receipt_fee = schema.Float( |
---|
194 | title = _(u'Loss of Receipt Fee'), |
---|
195 | default = 0.0, |
---|
196 | required = True, |
---|
197 | ) |
---|
198 | loss_clearance_fee = schema.Float( |
---|
199 | title = _(u'Loss of Clearance Fee'), |
---|
200 | default = 0.0, |
---|
201 | required = True, |
---|
202 | ) |
---|
203 | conv_brochure_fee = schema.Float( |
---|
204 | title = _(u'ND Convocation Brochure Fee'), |
---|
205 | default = 0.0, |
---|
206 | required = True, |
---|
207 | ) |
---|
208 | hnd_conv_brochure_fee = schema.Float( |
---|
209 | title = _(u'HND Convocation Brochure Fee'), |
---|
210 | default = 0.0, |
---|
211 | required = True, |
---|
212 | ) |
---|
213 | pgd_conv_brochure_fee = schema.Float( |
---|
214 | title = _(u'PGD Convocation Brochure Fee'), |
---|
215 | default = 0.0, |
---|
216 | required = True, |
---|
217 | ) |
---|
218 | log_book_fee = schema.Float( |
---|
219 | title = _(u'Log Book Fees'), |
---|
220 | default = 0.0, |
---|
221 | required = True, |
---|
222 | ) |
---|
223 | jamb_regularization_fee = schema.Float( |
---|
224 | title = _(u'Jamb Regularization Fee'), |
---|
225 | default = 0.0, |
---|
226 | required = True, |
---|
227 | ) |
---|
228 | utme_registration_fee = schema.Float( |
---|
229 | title = _(u'UTME Registration Fee'), |
---|
230 | default = 0.0, |
---|
231 | required = True, |
---|
232 | ) |
---|
233 | utme_cbt_fee = schema.Float( |
---|
234 | title = _(u'UTME CBT Fee'), |
---|
235 | default = 0.0, |
---|
236 | required = True, |
---|
237 | ) |
---|
238 | nysc_id_card_fee = schema.Float( |
---|
239 | title = _(u'NYSC ID Card Fee'), |
---|
240 | default = 0.0, |
---|
241 | required = True, |
---|
242 | ) |
---|
243 | ijmb_result_fee = schema.Float( |
---|
244 | title = _(u'IJMB Result Fee'), |
---|
245 | default = 0.0, |
---|
246 | required = True, |
---|
247 | ) |
---|
248 | carryover1_fee = schema.Float( |
---|
249 | title = _(u'1, 2 or 3 Carry-Over Courses Fee'), |
---|
250 | default = 0.0, |
---|
251 | required = True, |
---|
252 | ) |
---|
253 | carryover4_fee = schema.Float( |
---|
254 | title = _(u'4 Carry-Over Courses Fee'), |
---|
255 | default = 0.0, |
---|
256 | required = True, |
---|
257 | ) |
---|
258 | carryover5_fee = schema.Float( |
---|
259 | title = _(u'5 Carry-Over Courses Fee'), |
---|
260 | default = 0.0, |
---|
261 | required = True, |
---|
262 | ) |
---|
263 | carryover6_fee = schema.Float( |
---|
264 | title = _(u'6 Carry-Over Courses Fee'), |
---|
265 | default = 0.0, |
---|
266 | required = True, |
---|
267 | ) |
---|
268 | carryover7_fee = schema.Float( |
---|
269 | title = _(u'7 Carry-Over Courses Fee'), |
---|
270 | default = 0.0, |
---|
271 | required = True, |
---|
272 | ) |
---|
273 | carryover8_fee = schema.Float( |
---|
274 | title = _(u'8 Carry-Over Courses Fee'), |
---|
275 | default = 0.0, |
---|
276 | required = True, |
---|
277 | ) |
---|
278 | carryover9_fee = schema.Float( |
---|
279 | title = _(u'9 Carry-Over Courses Fee'), |
---|
280 | default = 0.0, |
---|
281 | required = True, |
---|
282 | ) |
---|
283 | carryover10_fee = schema.Float( |
---|
284 | title = _(u'10 Carry-Over Courses Fee'), |
---|
285 | default = 0.0, |
---|
286 | required = True, |
---|
287 | ) |
---|
288 | carryover11_fee = schema.Float( |
---|
289 | title = _(u'11 Carry-Over Courses Fee'), |
---|
290 | default = 0.0, |
---|
291 | required = True, |
---|
292 | ) |
---|
293 | carryover12_fee = schema.Float( |
---|
294 | title = _(u'12 Carry-Over Courses Fee'), |
---|
295 | default = 0.0, |
---|
296 | required = True, |
---|
297 | ) |
---|
298 | balance_fee = schema.Float( |
---|
299 | title = _(u'Balance Payment'), |
---|
300 | default = 0.0, |
---|
301 | required = True, |
---|
302 | ) |
---|
303 | |
---|
304 | def getSessionString(): |
---|
305 | """Returns the session string from the vocabulary. |
---|
306 | """ |
---|
307 | |
---|
308 | |
---|
309 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
310 | """A session configuration object in add mode. |
---|
311 | """ |
---|
312 | |
---|
313 | academic_session = schema.Choice( |
---|
314 | title = _(u'Academic Session'), |
---|
315 | source = academic_sessions_vocab, |
---|
316 | default = None, |
---|
317 | required = True, |
---|
318 | readonly = False, |
---|
319 | ) |
---|
320 | |
---|
321 | ICustomSessionConfigurationAdd[ |
---|
322 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
323 | 'academic_session'].order |
---|