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