1 | ## $Id: interfaces.py 16309 2020-11-10 14:33:53Z 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 | |
---|
84 | hnd_certificate_fee = schema.Float( |
---|
85 | title = _(u'HND Certificate Fee'), |
---|
86 | default = 0.0, |
---|
87 | required = True, |
---|
88 | ) |
---|
89 | |
---|
90 | pgd_certificate_fee = schema.Float( |
---|
91 | title = _(u'PGD Certificate Fee'), |
---|
92 | default = 0.0, |
---|
93 | required = True, |
---|
94 | ) |
---|
95 | |
---|
96 | state_result_fee = schema.Float( |
---|
97 | title = _(u'ND Statement of Result Fee'), |
---|
98 | default = 0.0, |
---|
99 | required = True, |
---|
100 | ) |
---|
101 | |
---|
102 | hnd_state_result_fee = schema.Float( |
---|
103 | title = _(u'HND Statement of Result Fee'), |
---|
104 | default = 0.0, |
---|
105 | required = True, |
---|
106 | ) |
---|
107 | |
---|
108 | pgd_state_result_fee = schema.Float( |
---|
109 | title = _(u'PGD Statement of Result Fee'), |
---|
110 | default = 0.0, |
---|
111 | required = True, |
---|
112 | ) |
---|
113 | |
---|
114 | transcript_local_fee = schema.Float( |
---|
115 | title = _(u'ND Transcript (local) Fee'), |
---|
116 | default = 0.0, |
---|
117 | required = True, |
---|
118 | ) |
---|
119 | |
---|
120 | hnd_transcript_local_fee = schema.Float( |
---|
121 | title = _(u'HND Transcript (local) Fee'), |
---|
122 | default = 0.0, |
---|
123 | required = True, |
---|
124 | ) |
---|
125 | |
---|
126 | pgd_transcript_local_fee = schema.Float( |
---|
127 | title = _(u'PGD Transcript (local) Fee'), |
---|
128 | default = 0.0, |
---|
129 | required = True, |
---|
130 | ) |
---|
131 | |
---|
132 | transcript_foreign_fee = schema.Float( |
---|
133 | title = _(u'ND Transcript (foreign) Fee'), |
---|
134 | default = 0.0, |
---|
135 | required = True, |
---|
136 | ) |
---|
137 | |
---|
138 | hnd_transcript_foreign_fee = schema.Float( |
---|
139 | title = _(u'HND Transcript (foreign) Fee'), |
---|
140 | default = 0.0, |
---|
141 | required = True, |
---|
142 | ) |
---|
143 | |
---|
144 | pgd_transcript_foreign_fee = schema.Float( |
---|
145 | title = _(u'PGD Transcript (foreign) Fee'), |
---|
146 | default = 0.0, |
---|
147 | required = True, |
---|
148 | ) |
---|
149 | |
---|
150 | ver_result_fee = schema.Float( |
---|
151 | title = _(u'Verification of Result Fee'), |
---|
152 | default = 0.0, |
---|
153 | required = True, |
---|
154 | ) |
---|
155 | |
---|
156 | change_course_fee = schema.Float( |
---|
157 | title = _(u'Change of Course Fee'), |
---|
158 | default = 0.0, |
---|
159 | required = True, |
---|
160 | ) |
---|
161 | |
---|
162 | change_inst_fee = schema.Float( |
---|
163 | title = _(u'Change of Institute Fee'), |
---|
164 | default = 0.0, |
---|
165 | required = True, |
---|
166 | ) |
---|
167 | |
---|
168 | jamb_reject_fee = schema.Float( |
---|
169 | title = _(u'JAMB Rejection Form Fee'), |
---|
170 | default = 0.0, |
---|
171 | required = True, |
---|
172 | ) |
---|
173 | |
---|
174 | cert_of_cert_fee = schema.Float( |
---|
175 | title = _(u'Certification of Certificate Fee'), |
---|
176 | default = 0.0, |
---|
177 | required = True, |
---|
178 | ) |
---|
179 | |
---|
180 | ref_let_fee = schema.Float( |
---|
181 | title = _(u'Recommendation/Reference Letter Fee'), |
---|
182 | default = 0.0, |
---|
183 | required = True, |
---|
184 | ) |
---|
185 | |
---|
186 | proc_cert_fee = schema.Float( |
---|
187 | title = _(u'Processing of Certificate by Proxy Fee'), |
---|
188 | default = 0.0, |
---|
189 | required = True, |
---|
190 | ) |
---|
191 | |
---|
192 | loss_idcard_fee = schema.Float( |
---|
193 | title = _(u'Loss of ID Card Fee (student)'), |
---|
194 | default = 0.0, |
---|
195 | required = True, |
---|
196 | ) |
---|
197 | |
---|
198 | staff_loss_idcard_fee = schema.Float( |
---|
199 | title = _(u'Loss of ID Card Fee (staff)'), |
---|
200 | default = 0.0, |
---|
201 | required = True, |
---|
202 | ) |
---|
203 | |
---|
204 | loss_examcard_fee = schema.Float( |
---|
205 | title = _(u'Loss of Exam Card Fee'), |
---|
206 | default = 0.0, |
---|
207 | required = True, |
---|
208 | ) |
---|
209 | |
---|
210 | loss_result_fee = schema.Float( |
---|
211 | title = _(u'Loss of Result Fee'), |
---|
212 | default = 0.0, |
---|
213 | required = True, |
---|
214 | ) |
---|
215 | |
---|
216 | loss_receipt_fee = schema.Float( |
---|
217 | title = _(u'Loss of Receipt Fee'), |
---|
218 | default = 0.0, |
---|
219 | required = True, |
---|
220 | ) |
---|
221 | |
---|
222 | loss_clearance_fee = schema.Float( |
---|
223 | title = _(u'Loss of Clearance Fee'), |
---|
224 | default = 0.0, |
---|
225 | required = True, |
---|
226 | ) |
---|
227 | |
---|
228 | #conv_brochure_fee = schema.Float( |
---|
229 | # title = _(u'ND Convocation Brochure Fee'), |
---|
230 | # default = 0.0, |
---|
231 | # required = True, |
---|
232 | # ) |
---|
233 | |
---|
234 | #hnd_conv_brochure_fee = schema.Float( |
---|
235 | # title = _(u'HND Convocation Brochure Fee'), |
---|
236 | # default = 0.0, |
---|
237 | # required = True, |
---|
238 | # ) |
---|
239 | |
---|
240 | #pgd_conv_brochure_fee = schema.Float( |
---|
241 | # title = _(u'PGD Convocation Brochure Fee'), |
---|
242 | # default = 0.0, |
---|
243 | # required = True, |
---|
244 | # ) |
---|
245 | |
---|
246 | log_book_fee = schema.Float( |
---|
247 | title = _(u'Log Book Fees'), |
---|
248 | default = 0.0, |
---|
249 | required = True, |
---|
250 | ) |
---|
251 | |
---|
252 | jamb_regularization_fee = schema.Float( |
---|
253 | title = _(u'Jamb Regularization Fee'), |
---|
254 | default = 0.0, |
---|
255 | required = True, |
---|
256 | ) |
---|
257 | |
---|
258 | utme_registration_fee = schema.Float( |
---|
259 | title = _(u'UTME Registration Fee'), |
---|
260 | default = 0.0, |
---|
261 | required = True, |
---|
262 | ) |
---|
263 | |
---|
264 | utme_cbt_fee = schema.Float( |
---|
265 | title = _(u'UTME CBT Fee'), |
---|
266 | default = 0.0, |
---|
267 | required = True, |
---|
268 | ) |
---|
269 | |
---|
270 | nysc_id_card_fee = schema.Float( |
---|
271 | title = _(u'NYSC ID Card Fee'), |
---|
272 | default = 0.0, |
---|
273 | required = True, |
---|
274 | ) |
---|
275 | |
---|
276 | ijmb_result_fee = schema.Float( |
---|
277 | title = _(u'IJMB Result Fee'), |
---|
278 | default = 0.0, |
---|
279 | required = True, |
---|
280 | ) |
---|
281 | |
---|
282 | carryover1_fee = schema.Float( |
---|
283 | title = _(u'1, 2 or 3 Carry-Over Courses Fee'), |
---|
284 | default = 0.0, |
---|
285 | required = True, |
---|
286 | ) |
---|
287 | |
---|
288 | carryover4_fee = schema.Float( |
---|
289 | title = _(u'4 Carry-Over Courses Fee'), |
---|
290 | default = 0.0, |
---|
291 | required = True, |
---|
292 | ) |
---|
293 | |
---|
294 | carryover5_fee = schema.Float( |
---|
295 | title = _(u'5 Carry-Over Courses Fee'), |
---|
296 | default = 0.0, |
---|
297 | required = True, |
---|
298 | ) |
---|
299 | |
---|
300 | carryover6_fee = schema.Float( |
---|
301 | title = _(u'6 Carry-Over Courses Fee'), |
---|
302 | default = 0.0, |
---|
303 | required = True, |
---|
304 | ) |
---|
305 | |
---|
306 | carryover7_fee = schema.Float( |
---|
307 | title = _(u'7 Carry-Over Courses Fee'), |
---|
308 | default = 0.0, |
---|
309 | required = True, |
---|
310 | ) |
---|
311 | |
---|
312 | carryover8_fee = schema.Float( |
---|
313 | title = _(u'8 Carry-Over Courses Fee'), |
---|
314 | default = 0.0, |
---|
315 | required = True, |
---|
316 | ) |
---|
317 | |
---|
318 | carryover9_fee = schema.Float( |
---|
319 | title = _(u'9 Carry-Over Courses Fee'), |
---|
320 | default = 0.0, |
---|
321 | required = True, |
---|
322 | ) |
---|
323 | |
---|
324 | carryover10_fee = schema.Float( |
---|
325 | title = _(u'10 Carry-Over Courses Fee'), |
---|
326 | default = 0.0, |
---|
327 | required = True, |
---|
328 | ) |
---|
329 | |
---|
330 | carryover11_fee = schema.Float( |
---|
331 | title = _(u'11 Carry-Over Courses Fee'), |
---|
332 | default = 0.0, |
---|
333 | required = True, |
---|
334 | ) |
---|
335 | |
---|
336 | carryover12_fee = schema.Float( |
---|
337 | title = _(u'12 Carry-Over Courses Fee'), |
---|
338 | default = 0.0, |
---|
339 | required = True, |
---|
340 | ) |
---|
341 | |
---|
342 | balance_fee = schema.Float( |
---|
343 | title = _(u'Balance Payment'), |
---|
344 | default = 0.0, |
---|
345 | required = True, |
---|
346 | ) |
---|
347 | |
---|
348 | sports_fee = schema.Float( |
---|
349 | title = _(u'Sports Clearance Levy'), |
---|
350 | default = 0.0, |
---|
351 | required = True, |
---|
352 | ) |
---|
353 | |
---|
354 | siwes_fee = schema.Float( |
---|
355 | title = _(u'SIWES Fee'), |
---|
356 | default = 0.0, |
---|
357 | required = True, |
---|
358 | ) |
---|
359 | |
---|
360 | eed_1_fee = schema.Float( |
---|
361 | title = _(u'EED 1 Fee'), |
---|
362 | default = 0.0, |
---|
363 | required = True, |
---|
364 | ) |
---|
365 | |
---|
366 | eed_2_fee = schema.Float( |
---|
367 | title = _(u'EED 2 Fee'), |
---|
368 | default = 0.0, |
---|
369 | required = True, |
---|
370 | ) |
---|
371 | |
---|
372 | olevel_results_1_fee = schema.Float( |
---|
373 | title = _(u'O Level Results Verification 1'), |
---|
374 | default = 0.0, |
---|
375 | required = True, |
---|
376 | ) |
---|
377 | |
---|
378 | olevel_results_2_fee = schema.Float( |
---|
379 | title = _(u'O Level Results Verification 2'), |
---|
380 | default = 0.0, |
---|
381 | required = True, |
---|
382 | ) |
---|
383 | |
---|
384 | eng_1_fee = schema.Float( |
---|
385 | title = _(u'School of Engineering Dues I'), |
---|
386 | default = 0.0, |
---|
387 | required = True, |
---|
388 | ) |
---|
389 | |
---|
390 | eng_2_fee = schema.Float( |
---|
391 | title = _(u'School of Engineering Dues II'), |
---|
392 | default = 0.0, |
---|
393 | required = True, |
---|
394 | ) |
---|
395 | |
---|
396 | sbs_1_fee = schema.Float( |
---|
397 | title = _(u'SBS Pack I'), |
---|
398 | default = 0.0, |
---|
399 | required = True, |
---|
400 | ) |
---|
401 | |
---|
402 | sbs_2_fee = schema.Float( |
---|
403 | title = _(u'SBS Pack II'), |
---|
404 | default = 0.0, |
---|
405 | required = True, |
---|
406 | ) |
---|
407 | |
---|
408 | gns_1_fee = schema.Float( |
---|
409 | title = _(u'GNS Pack I'), |
---|
410 | default = 0.0, |
---|
411 | required = True, |
---|
412 | ) |
---|
413 | |
---|
414 | gns_2_fee = schema.Float( |
---|
415 | title = _(u'GNS Pack II'), |
---|
416 | default = 0.0, |
---|
417 | required = True, |
---|
418 | ) |
---|
419 | |
---|
420 | bfn_fee = schema.Float( |
---|
421 | title = _(u'BFN Pack'), |
---|
422 | default = 0.0, |
---|
423 | required = True, |
---|
424 | ) |
---|
425 | |
---|
426 | mkt_fee = schema.Float( |
---|
427 | title = _(u'MKT Pack'), |
---|
428 | default = 0.0, |
---|
429 | required = True, |
---|
430 | ) |
---|
431 | |
---|
432 | mcn_fee = schema.Float( |
---|
433 | title = _(u'MCN Pack'), |
---|
434 | default = 0.0, |
---|
435 | required = True, |
---|
436 | ) |
---|
437 | |
---|
438 | otm_fee = schema.Float( |
---|
439 | title = _(u'OTM Pack'), |
---|
440 | default = 0.0, |
---|
441 | required = True, |
---|
442 | ) |
---|
443 | |
---|
444 | acct_fee = schema.Float( |
---|
445 | title = _(u'ACCT Pack'), |
---|
446 | default = 0.0, |
---|
447 | required = True, |
---|
448 | ) |
---|
449 | |
---|
450 | bam_fee = schema.Float( |
---|
451 | title = _(u'BAM Pack'), |
---|
452 | default = 0.0, |
---|
453 | required = True, |
---|
454 | ) |
---|
455 | |
---|
456 | pom_fee = schema.Float( |
---|
457 | title = _(u'POM Pack'), |
---|
458 | default = 0.0, |
---|
459 | required = True, |
---|
460 | ) |
---|
461 | |
---|
462 | hrm_fee = schema.Float( |
---|
463 | title = _(u'HRM Pack'), |
---|
464 | default = 0.0, |
---|
465 | required = True, |
---|
466 | ) |
---|
467 | |
---|
468 | hndgrad_fee = schema.Float( |
---|
469 | title = _(u'HND Final Clearance Pack'), |
---|
470 | default = 0.0, |
---|
471 | required = True, |
---|
472 | ) |
---|
473 | |
---|
474 | ndgrad_fee = schema.Float( |
---|
475 | title = _(u'ND Final Clearance Pack'), |
---|
476 | default = 0.0, |
---|
477 | required = True, |
---|
478 | ) |
---|
479 | |
---|
480 | lsfp_penalty_fee = schema.Float( |
---|
481 | title = _(u'Late School Fee Payment Penalty Fee'), |
---|
482 | default = 0.0, |
---|
483 | required = True, |
---|
484 | ) |
---|
485 | |
---|
486 | conv_fee = schema.Float( |
---|
487 | title = _(u'Convocation Pack'), |
---|
488 | default = 0.0, |
---|
489 | required = True, |
---|
490 | ) |
---|
491 | |
---|
492 | def getSessionString(): |
---|
493 | """Returns the session string from the vocabulary. |
---|
494 | """ |
---|
495 | |
---|
496 | |
---|
497 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
498 | """A session configuration object in add mode. |
---|
499 | """ |
---|
500 | |
---|
501 | academic_session = schema.Choice( |
---|
502 | title = _(u'Academic Session'), |
---|
503 | source = academic_sessions_vocab, |
---|
504 | default = None, |
---|
505 | required = True, |
---|
506 | readonly = False, |
---|
507 | ) |
---|
508 | |
---|
509 | ICustomSessionConfigurationAdd[ |
---|
510 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
511 | 'academic_session'].order |
---|