1 | ## $Id: interfaces.py 16913 2022-04-07 16:43:08Z 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 (default)'), |
---|
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 | # Additional fees in custom package |
---|
70 | |
---|
71 | hnd_clearance_fee = schema.Float( |
---|
72 | title = _(u'HND Non-Local Acceptance Fee'), |
---|
73 | default = 0.0, |
---|
74 | required = False, |
---|
75 | ) |
---|
76 | |
---|
77 | nd_clearance_fee = schema.Float( |
---|
78 | title = _(u'ND Non-Local Acceptance Fee'), |
---|
79 | default = 0.0, |
---|
80 | required = False, |
---|
81 | ) |
---|
82 | |
---|
83 | hndlocal_clearance_fee = schema.Float( |
---|
84 | title = _(u'HND Local Acceptance Fee'), |
---|
85 | default = 0.0, |
---|
86 | required = False, |
---|
87 | ) |
---|
88 | |
---|
89 | ndlocal_clearance_fee = schema.Float( |
---|
90 | title = _(u'ND Local Acceptance Fee'), |
---|
91 | default = 0.0, |
---|
92 | required = False, |
---|
93 | ) |
---|
94 | |
---|
95 | hndpt_clearance_fee = schema.Float( |
---|
96 | title = _(u'HND Part-Time Acceptance Fee'), |
---|
97 | default = 0.0, |
---|
98 | required = False, |
---|
99 | ) |
---|
100 | |
---|
101 | ndpt_clearance_fee = schema.Float( |
---|
102 | title = _(u'ND Part-Time Acceptance Fee'), |
---|
103 | default = 0.0, |
---|
104 | required = False, |
---|
105 | ) |
---|
106 | |
---|
107 | gown_fee = schema.Float( |
---|
108 | title = _(u'Gown Fee'), |
---|
109 | default = 0.0, |
---|
110 | required = False, |
---|
111 | ) |
---|
112 | |
---|
113 | certificate_fee = schema.Float( |
---|
114 | title = _(u'ND Certificate Fee'), |
---|
115 | default = 0.0, |
---|
116 | required = True, |
---|
117 | ) |
---|
118 | |
---|
119 | hnd_certificate_fee = schema.Float( |
---|
120 | title = _(u'HND Certificate Fee'), |
---|
121 | default = 0.0, |
---|
122 | required = True, |
---|
123 | ) |
---|
124 | |
---|
125 | pgd_certificate_fee = schema.Float( |
---|
126 | title = _(u'PGD Certificate Fee'), |
---|
127 | default = 0.0, |
---|
128 | required = True, |
---|
129 | ) |
---|
130 | |
---|
131 | state_result_fee = schema.Float( |
---|
132 | title = _(u'ND Statement of Result Fee'), |
---|
133 | default = 0.0, |
---|
134 | required = True, |
---|
135 | ) |
---|
136 | |
---|
137 | hnd_state_result_fee = schema.Float( |
---|
138 | title = _(u'HND Statement of Result Fee'), |
---|
139 | default = 0.0, |
---|
140 | required = True, |
---|
141 | ) |
---|
142 | |
---|
143 | pgd_state_result_fee = schema.Float( |
---|
144 | title = _(u'PGD Statement of Result Fee'), |
---|
145 | default = 0.0, |
---|
146 | required = True, |
---|
147 | ) |
---|
148 | |
---|
149 | transcript_local_fee = schema.Float( |
---|
150 | title = _(u'ND Transcript (local) Fee'), |
---|
151 | default = 0.0, |
---|
152 | required = True, |
---|
153 | ) |
---|
154 | |
---|
155 | hnd_transcript_local_fee = schema.Float( |
---|
156 | title = _(u'HND Transcript (local) Fee'), |
---|
157 | default = 0.0, |
---|
158 | required = True, |
---|
159 | ) |
---|
160 | |
---|
161 | pgd_transcript_local_fee = schema.Float( |
---|
162 | title = _(u'PGD Transcript (local) Fee'), |
---|
163 | default = 0.0, |
---|
164 | required = True, |
---|
165 | ) |
---|
166 | |
---|
167 | transcript_foreign_fee = schema.Float( |
---|
168 | title = _(u'ND Transcript (foreign) Fee'), |
---|
169 | default = 0.0, |
---|
170 | required = True, |
---|
171 | ) |
---|
172 | |
---|
173 | hnd_transcript_foreign_fee = schema.Float( |
---|
174 | title = _(u'HND Transcript (foreign) Fee'), |
---|
175 | default = 0.0, |
---|
176 | required = True, |
---|
177 | ) |
---|
178 | |
---|
179 | pgd_transcript_foreign_fee = schema.Float( |
---|
180 | title = _(u'PGD Transcript (foreign) Fee'), |
---|
181 | default = 0.0, |
---|
182 | required = True, |
---|
183 | ) |
---|
184 | |
---|
185 | ver_result_fee = schema.Float( |
---|
186 | title = _(u'Verification of Result Fee'), |
---|
187 | default = 0.0, |
---|
188 | required = True, |
---|
189 | ) |
---|
190 | |
---|
191 | change_course_fee = schema.Float( |
---|
192 | title = _(u'Change of Course Fee'), |
---|
193 | default = 0.0, |
---|
194 | required = True, |
---|
195 | ) |
---|
196 | |
---|
197 | change_inst_fee = schema.Float( |
---|
198 | title = _(u'Change of Institute Fee'), |
---|
199 | default = 0.0, |
---|
200 | required = True, |
---|
201 | ) |
---|
202 | |
---|
203 | jamb_reject_fee = schema.Float( |
---|
204 | title = _(u'JAMB Rejection Form Fee'), |
---|
205 | default = 0.0, |
---|
206 | required = True, |
---|
207 | ) |
---|
208 | |
---|
209 | cert_of_cert_fee = schema.Float( |
---|
210 | title = _(u'Certification of Certificate Fee'), |
---|
211 | default = 0.0, |
---|
212 | required = True, |
---|
213 | ) |
---|
214 | |
---|
215 | ref_let_fee = schema.Float( |
---|
216 | title = _(u'Recommendation/Reference Letter Fee'), |
---|
217 | default = 0.0, |
---|
218 | required = True, |
---|
219 | ) |
---|
220 | |
---|
221 | proc_cert_fee = schema.Float( |
---|
222 | title = _(u'Processing of Certificate by Proxy Fee'), |
---|
223 | default = 0.0, |
---|
224 | required = True, |
---|
225 | ) |
---|
226 | |
---|
227 | loss_idcard_fee = schema.Float( |
---|
228 | title = _(u'Loss of ID Card Fee (student)'), |
---|
229 | default = 0.0, |
---|
230 | required = True, |
---|
231 | ) |
---|
232 | |
---|
233 | staff_loss_idcard_fee = schema.Float( |
---|
234 | title = _(u'Loss of ID Card Fee (staff)'), |
---|
235 | default = 0.0, |
---|
236 | required = True, |
---|
237 | ) |
---|
238 | |
---|
239 | loss_examcard_fee = schema.Float( |
---|
240 | title = _(u'Loss of Exam Card Fee'), |
---|
241 | default = 0.0, |
---|
242 | required = True, |
---|
243 | ) |
---|
244 | |
---|
245 | loss_result_fee = schema.Float( |
---|
246 | title = _(u'Loss of Result Fee'), |
---|
247 | default = 0.0, |
---|
248 | required = True, |
---|
249 | ) |
---|
250 | |
---|
251 | loss_receipt_fee = schema.Float( |
---|
252 | title = _(u'Loss of Receipt Fee'), |
---|
253 | default = 0.0, |
---|
254 | required = True, |
---|
255 | ) |
---|
256 | |
---|
257 | loss_clearance_fee = schema.Float( |
---|
258 | title = _(u'Loss of Clearance Fee'), |
---|
259 | default = 0.0, |
---|
260 | required = True, |
---|
261 | ) |
---|
262 | |
---|
263 | #conv_brochure_fee = schema.Float( |
---|
264 | # title = _(u'ND Convocation Brochure Fee'), |
---|
265 | # default = 0.0, |
---|
266 | # required = True, |
---|
267 | # ) |
---|
268 | |
---|
269 | #hnd_conv_brochure_fee = schema.Float( |
---|
270 | # title = _(u'HND Convocation Brochure Fee'), |
---|
271 | # default = 0.0, |
---|
272 | # required = True, |
---|
273 | # ) |
---|
274 | |
---|
275 | #pgd_conv_brochure_fee = schema.Float( |
---|
276 | # title = _(u'PGD Convocation Brochure Fee'), |
---|
277 | # default = 0.0, |
---|
278 | # required = True, |
---|
279 | # ) |
---|
280 | |
---|
281 | log_book_fee = schema.Float( |
---|
282 | title = _(u'Log Book Fees'), |
---|
283 | default = 0.0, |
---|
284 | required = True, |
---|
285 | ) |
---|
286 | |
---|
287 | jamb_regularization_fee = schema.Float( |
---|
288 | title = _(u'Jamb Regularization Fee'), |
---|
289 | default = 0.0, |
---|
290 | required = True, |
---|
291 | ) |
---|
292 | |
---|
293 | utme_registration_fee = schema.Float( |
---|
294 | title = _(u'UTME Registration Fee'), |
---|
295 | default = 0.0, |
---|
296 | required = True, |
---|
297 | ) |
---|
298 | |
---|
299 | utme_cbt_fee = schema.Float( |
---|
300 | title = _(u'UTME CBT Fee'), |
---|
301 | default = 0.0, |
---|
302 | required = True, |
---|
303 | ) |
---|
304 | |
---|
305 | nysc_id_card_fee = schema.Float( |
---|
306 | title = _(u'NYSC ID Card Fee'), |
---|
307 | default = 0.0, |
---|
308 | required = True, |
---|
309 | ) |
---|
310 | |
---|
311 | ijmb_result_fee = schema.Float( |
---|
312 | title = _(u'IJMB Result Fee'), |
---|
313 | default = 0.0, |
---|
314 | required = True, |
---|
315 | ) |
---|
316 | |
---|
317 | carryover1_fee = schema.Float( |
---|
318 | title = _(u'1, 2 or 3 Carry-Over Courses Fee'), |
---|
319 | default = 0.0, |
---|
320 | required = True, |
---|
321 | ) |
---|
322 | |
---|
323 | carryover4_fee = schema.Float( |
---|
324 | title = _(u'4 Carry-Over Courses Fee'), |
---|
325 | default = 0.0, |
---|
326 | required = True, |
---|
327 | ) |
---|
328 | |
---|
329 | carryover5_fee = schema.Float( |
---|
330 | title = _(u'5 Carry-Over Courses Fee'), |
---|
331 | default = 0.0, |
---|
332 | required = True, |
---|
333 | ) |
---|
334 | |
---|
335 | carryover6_fee = schema.Float( |
---|
336 | title = _(u'6 Carry-Over Courses Fee'), |
---|
337 | default = 0.0, |
---|
338 | required = True, |
---|
339 | ) |
---|
340 | |
---|
341 | carryover7_fee = schema.Float( |
---|
342 | title = _(u'7 Carry-Over Courses Fee'), |
---|
343 | default = 0.0, |
---|
344 | required = True, |
---|
345 | ) |
---|
346 | |
---|
347 | carryover8_fee = schema.Float( |
---|
348 | title = _(u'8 Carry-Over Courses Fee'), |
---|
349 | default = 0.0, |
---|
350 | required = True, |
---|
351 | ) |
---|
352 | |
---|
353 | carryover9_fee = schema.Float( |
---|
354 | title = _(u'9 Carry-Over Courses Fee'), |
---|
355 | default = 0.0, |
---|
356 | required = True, |
---|
357 | ) |
---|
358 | |
---|
359 | carryover10_fee = schema.Float( |
---|
360 | title = _(u'10 Carry-Over Courses Fee'), |
---|
361 | default = 0.0, |
---|
362 | required = True, |
---|
363 | ) |
---|
364 | |
---|
365 | carryover11_fee = schema.Float( |
---|
366 | title = _(u'11 Carry-Over Courses Fee'), |
---|
367 | default = 0.0, |
---|
368 | required = True, |
---|
369 | ) |
---|
370 | |
---|
371 | carryover12_fee = schema.Float( |
---|
372 | title = _(u'12 Carry-Over Courses Fee'), |
---|
373 | default = 0.0, |
---|
374 | required = True, |
---|
375 | ) |
---|
376 | |
---|
377 | balance_fee = schema.Float( |
---|
378 | title = _(u'Balance Payment'), |
---|
379 | default = 0.0, |
---|
380 | required = True, |
---|
381 | ) |
---|
382 | |
---|
383 | sports_fee = schema.Float( |
---|
384 | title = _(u'Sports Clearance Levy'), |
---|
385 | default = 0.0, |
---|
386 | required = True, |
---|
387 | ) |
---|
388 | |
---|
389 | siwes_fee = schema.Float( |
---|
390 | title = _(u'SIWES Fee'), |
---|
391 | default = 0.0, |
---|
392 | required = True, |
---|
393 | ) |
---|
394 | |
---|
395 | eed_1_fee = schema.Float( |
---|
396 | title = _(u'EED 1 Fee'), |
---|
397 | default = 0.0, |
---|
398 | required = True, |
---|
399 | ) |
---|
400 | |
---|
401 | eed_2_fee = schema.Float( |
---|
402 | title = _(u'EED 2 Fee'), |
---|
403 | default = 0.0, |
---|
404 | required = True, |
---|
405 | ) |
---|
406 | |
---|
407 | eed_extra_fee = schema.Float( |
---|
408 | title = _(u'EED Extra Fee'), |
---|
409 | default = 0.0, |
---|
410 | required = True, |
---|
411 | ) |
---|
412 | |
---|
413 | olevel_results_1_fee = schema.Float( |
---|
414 | title = _(u'O Level Results Verification 1'), |
---|
415 | default = 0.0, |
---|
416 | required = True, |
---|
417 | ) |
---|
418 | |
---|
419 | olevel_results_2_fee = schema.Float( |
---|
420 | title = _(u'O Level Results Verification 2'), |
---|
421 | default = 0.0, |
---|
422 | required = True, |
---|
423 | ) |
---|
424 | |
---|
425 | eng_1_fee = schema.Float( |
---|
426 | title = _(u'School of Engineering Dues I'), |
---|
427 | default = 0.0, |
---|
428 | required = True, |
---|
429 | ) |
---|
430 | |
---|
431 | eng_2_fee = schema.Float( |
---|
432 | title = _(u'School of Engineering Dues II'), |
---|
433 | default = 0.0, |
---|
434 | required = True, |
---|
435 | ) |
---|
436 | |
---|
437 | sbs_1_fee = schema.Float( |
---|
438 | title = _(u'SBS Pack I'), |
---|
439 | default = 0.0, |
---|
440 | required = True, |
---|
441 | ) |
---|
442 | |
---|
443 | sbs_2_fee = schema.Float( |
---|
444 | title = _(u'SBS Pack II'), |
---|
445 | default = 0.0, |
---|
446 | required = True, |
---|
447 | ) |
---|
448 | |
---|
449 | gns_1_fee = schema.Float( |
---|
450 | title = _(u'GNS Pack I'), |
---|
451 | default = 0.0, |
---|
452 | required = True, |
---|
453 | ) |
---|
454 | |
---|
455 | gns_2_fee = schema.Float( |
---|
456 | title = _(u'GNS Pack II'), |
---|
457 | default = 0.0, |
---|
458 | required = True, |
---|
459 | ) |
---|
460 | |
---|
461 | bfn_fee = schema.Float( |
---|
462 | title = _(u'BFN Pack'), |
---|
463 | default = 0.0, |
---|
464 | required = True, |
---|
465 | ) |
---|
466 | |
---|
467 | mkt_fee = schema.Float( |
---|
468 | title = _(u'MKT Pack'), |
---|
469 | default = 0.0, |
---|
470 | required = True, |
---|
471 | ) |
---|
472 | |
---|
473 | mcn_fee = schema.Float( |
---|
474 | title = _(u'MCN Pack'), |
---|
475 | default = 0.0, |
---|
476 | required = True, |
---|
477 | ) |
---|
478 | |
---|
479 | otm_fee = schema.Float( |
---|
480 | title = _(u'OTM Pack'), |
---|
481 | default = 0.0, |
---|
482 | required = True, |
---|
483 | ) |
---|
484 | |
---|
485 | acct_fee = schema.Float( |
---|
486 | title = _(u'ACCT Pack'), |
---|
487 | default = 0.0, |
---|
488 | required = True, |
---|
489 | ) |
---|
490 | |
---|
491 | bam_fee = schema.Float( |
---|
492 | title = _(u'BAM Pack'), |
---|
493 | default = 0.0, |
---|
494 | required = True, |
---|
495 | ) |
---|
496 | |
---|
497 | pom_fee = schema.Float( |
---|
498 | title = _(u'POM Pack'), |
---|
499 | default = 0.0, |
---|
500 | required = True, |
---|
501 | ) |
---|
502 | |
---|
503 | hrm_fee = schema.Float( |
---|
504 | title = _(u'HRM Pack'), |
---|
505 | default = 0.0, |
---|
506 | required = True, |
---|
507 | ) |
---|
508 | |
---|
509 | hndgrad_fee = schema.Float( |
---|
510 | title = _(u'HND Final Clearance Pack'), |
---|
511 | default = 0.0, |
---|
512 | required = True, |
---|
513 | ) |
---|
514 | |
---|
515 | ndgrad_fee = schema.Float( |
---|
516 | title = _(u'ND Final Clearance Pack'), |
---|
517 | default = 0.0, |
---|
518 | required = True, |
---|
519 | ) |
---|
520 | |
---|
521 | lsfp_penalty_fee = schema.Float( |
---|
522 | title = _(u'Late School Fee Payment Penalty Fee'), |
---|
523 | default = 0.0, |
---|
524 | required = True, |
---|
525 | ) |
---|
526 | |
---|
527 | conv_fee = schema.Float( |
---|
528 | title = _(u'Convocation Pack'), |
---|
529 | default = 0.0, |
---|
530 | required = True, |
---|
531 | ) |
---|
532 | |
---|
533 | facilities_fee = schema.Float( |
---|
534 | title = _(u'Facilities Upgrade Fee'), |
---|
535 | default = 0.0, |
---|
536 | required = True, |
---|
537 | ) |
---|
538 | |
---|
539 | sas_1_fee = schema.Float( |
---|
540 | title = _(u'SAS Pack I'), |
---|
541 | default = 0.0, |
---|
542 | required = True, |
---|
543 | ) |
---|
544 | |
---|
545 | sas_2_fee = schema.Float( |
---|
546 | title = _(u'SAS Pack II'), |
---|
547 | default = 0.0, |
---|
548 | required = True, |
---|
549 | ) |
---|
550 | |
---|
551 | com_fee = schema.Float( |
---|
552 | title = _(u'COM Pack'), |
---|
553 | default = 0.0, |
---|
554 | required = True, |
---|
555 | ) |
---|
556 | |
---|
557 | sta_fee = schema.Float( |
---|
558 | title = _(u'STA Pack'), |
---|
559 | default = 0.0, |
---|
560 | required = True, |
---|
561 | ) |
---|
562 | |
---|
563 | slt_1_fee = schema.Float( |
---|
564 | title = _(u'SLT Pack I'), |
---|
565 | default = 0.0, |
---|
566 | required = True, |
---|
567 | ) |
---|
568 | |
---|
569 | slt_2_fee = schema.Float( |
---|
570 | title = _(u'SLT Pack II'), |
---|
571 | default = 0.0, |
---|
572 | required = True, |
---|
573 | ) |
---|
574 | |
---|
575 | lis_fee = schema.Float( |
---|
576 | title = _(u'LIS Pack'), |
---|
577 | default = 0.0, |
---|
578 | required = True, |
---|
579 | ) |
---|
580 | |
---|
581 | htm_fee = schema.Float( |
---|
582 | title = _(u'HTM Pack'), |
---|
583 | default = 0.0, |
---|
584 | required = True, |
---|
585 | ) |
---|
586 | |
---|
587 | pa_fee = schema.Float( |
---|
588 | title = _(u'PAD Pack'), |
---|
589 | default = 0.0, |
---|
590 | required = True, |
---|
591 | ) |
---|
592 | |
---|
593 | |
---|
594 | def getSessionString(): |
---|
595 | """Returns the session string from the vocabulary. |
---|
596 | """ |
---|
597 | |
---|
598 | |
---|
599 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
600 | """A session configuration object in add mode. |
---|
601 | """ |
---|
602 | |
---|
603 | academic_session = schema.Choice( |
---|
604 | title = _(u'Academic Session'), |
---|
605 | source = academic_sessions_vocab, |
---|
606 | default = None, |
---|
607 | required = True, |
---|
608 | readonly = False, |
---|
609 | ) |
---|
610 | |
---|
611 | ICustomSessionConfigurationAdd[ |
---|
612 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
613 | 'academic_session'].order |
---|