| 1 | ## $Id: interfaces.py 13122 2015-07-01 15:55:54Z 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 | pgd_transcript_local_fee = schema.Float(
|
|---|
| 116 | title = _(u'PGD Transcript (local) Fee'),
|
|---|
| 117 | default = 0.0,
|
|---|
| 118 | required = True,
|
|---|
| 119 | )
|
|---|
| 120 | transcript_foreign_fee = schema.Float(
|
|---|
| 121 | title = _(u'ND Transcript (foreign) Fee'),
|
|---|
| 122 | default = 0.0,
|
|---|
| 123 | required = True,
|
|---|
| 124 | )
|
|---|
| 125 | hnd_transcript_foreign_fee = schema.Float(
|
|---|
| 126 | title = _(u'HND Transcript (foreign) Fee'),
|
|---|
| 127 | default = 0.0,
|
|---|
| 128 | required = True,
|
|---|
| 129 | )
|
|---|
| 130 | pgd_transcript_foreign_fee = schema.Float(
|
|---|
| 131 | title = _(u'PGD Transcript (foreign) Fee'),
|
|---|
| 132 | default = 0.0,
|
|---|
| 133 | required = True,
|
|---|
| 134 | )
|
|---|
| 135 | ver_result_fee = schema.Float(
|
|---|
| 136 | title = _(u'Verification of Result Fee'),
|
|---|
| 137 | default = 0.0,
|
|---|
| 138 | required = True,
|
|---|
| 139 | )
|
|---|
| 140 | change_course_fee = schema.Float(
|
|---|
| 141 | title = _(u'Change of Course Fee'),
|
|---|
| 142 | default = 0.0,
|
|---|
| 143 | required = True,
|
|---|
| 144 | )
|
|---|
| 145 | change_inst_fee = schema.Float(
|
|---|
| 146 | title = _(u'Change of Institute Fee'),
|
|---|
| 147 | default = 0.0,
|
|---|
| 148 | required = True,
|
|---|
| 149 | )
|
|---|
| 150 | jamb_reject_fee = schema.Float(
|
|---|
| 151 | title = _(u'JAMB Rejection Form Fee'),
|
|---|
| 152 | default = 0.0,
|
|---|
| 153 | required = True,
|
|---|
| 154 | )
|
|---|
| 155 | cert_of_cert_fee = schema.Float(
|
|---|
| 156 | title = _(u'Certification of Certificate Fee'),
|
|---|
| 157 | default = 0.0,
|
|---|
| 158 | required = True,
|
|---|
| 159 | )
|
|---|
| 160 | ref_let_fee = schema.Float(
|
|---|
| 161 | title = _(u'Recommendation/Reference Letter Fee'),
|
|---|
| 162 | default = 0.0,
|
|---|
| 163 | required = True,
|
|---|
| 164 | )
|
|---|
| 165 | proc_cert_fee = schema.Float(
|
|---|
| 166 | title = _(u'Processing of Certificate by Proxy Fee'),
|
|---|
| 167 | default = 0.0,
|
|---|
| 168 | required = True,
|
|---|
| 169 | )
|
|---|
| 170 | loss_idcard_fee = schema.Float(
|
|---|
| 171 | title = _(u'Loss of ID Card Fee (student)'),
|
|---|
| 172 | default = 0.0,
|
|---|
| 173 | required = True,
|
|---|
| 174 | )
|
|---|
| 175 | staff_loss_idcard_fee = schema.Float(
|
|---|
| 176 | title = _(u'Loss of ID Card Fee (staff)'),
|
|---|
| 177 | default = 0.0,
|
|---|
| 178 | required = True,
|
|---|
| 179 | )
|
|---|
| 180 | loss_examcard_fee = schema.Float(
|
|---|
| 181 | title = _(u'Loss of Exam Card Fee'),
|
|---|
| 182 | default = 0.0,
|
|---|
| 183 | required = True,
|
|---|
| 184 | )
|
|---|
| 185 | loss_result_fee = schema.Float(
|
|---|
| 186 | title = _(u'Loss of Result Fee'),
|
|---|
| 187 | default = 0.0,
|
|---|
| 188 | required = True,
|
|---|
| 189 | )
|
|---|
| 190 | loss_receipt_fee = schema.Float(
|
|---|
| 191 | title = _(u'Loss of Receipt Fee'),
|
|---|
| 192 | default = 0.0,
|
|---|
| 193 | required = True,
|
|---|
| 194 | )
|
|---|
| 195 | loss_clearance_fee = schema.Float(
|
|---|
| 196 | title = _(u'Loss of Clearance Fee'),
|
|---|
| 197 | default = 0.0,
|
|---|
| 198 | required = True,
|
|---|
| 199 | )
|
|---|
| 200 | conv_brochure_fee = schema.Float(
|
|---|
| 201 | title = _(u'ND Convocation Brochure Fee'),
|
|---|
| 202 | default = 0.0,
|
|---|
| 203 | required = True,
|
|---|
| 204 | )
|
|---|
| 205 | hnd_conv_brochure_fee = schema.Float(
|
|---|
| 206 | title = _(u'HND Convocation Brochure Fee'),
|
|---|
| 207 | default = 0.0,
|
|---|
| 208 | required = True,
|
|---|
| 209 | )
|
|---|
| 210 | pgd_conv_brochure_fee = schema.Float(
|
|---|
| 211 | title = _(u'PGD Convocation Brochure Fee'),
|
|---|
| 212 | default = 0.0,
|
|---|
| 213 | required = True,
|
|---|
| 214 | )
|
|---|
| 215 | log_book_fee = schema.Float(
|
|---|
| 216 | title = _(u'Log Book Fees'),
|
|---|
| 217 | default = 0.0,
|
|---|
| 218 | required = True,
|
|---|
| 219 | )
|
|---|
| 220 | jamb_regularization_fee = schema.Float(
|
|---|
| 221 | title = _(u'Jamb Regularization Fee'),
|
|---|
| 222 | default = 0.0,
|
|---|
| 223 | required = True,
|
|---|
| 224 | )
|
|---|
| 225 | utme_registration_fee = schema.Float(
|
|---|
| 226 | title = _(u'UTME Registration Fee'),
|
|---|
| 227 | default = 0.0,
|
|---|
| 228 | required = True,
|
|---|
| 229 | )
|
|---|
| 230 | utme_cbt_fee = schema.Float(
|
|---|
| 231 | title = _(u'UTME CBT Fee'),
|
|---|
| 232 | default = 0.0,
|
|---|
| 233 | required = True,
|
|---|
| 234 | )
|
|---|
| 235 | nysc_id_card_fee = schema.Float(
|
|---|
| 236 | title = _(u'NYSC ID Card Fee'),
|
|---|
| 237 | default = 0.0,
|
|---|
| 238 | required = True,
|
|---|
| 239 | )
|
|---|
| 240 | penalty_ug = schema.Float(
|
|---|
| 241 | title = _(u'UG Penalty Fee'),
|
|---|
| 242 | default = 0.0,
|
|---|
| 243 | required = True,
|
|---|
| 244 | )
|
|---|
| 245 | penalty_pg = schema.Float(
|
|---|
| 246 | title = _(u'PG Penalty Fee'),
|
|---|
| 247 | default = 0.0,
|
|---|
| 248 | required = True,
|
|---|
| 249 | )
|
|---|
| 250 |
|
|---|
| 251 | def getSessionString():
|
|---|
| 252 | """Returns the session string from the vocabulary.
|
|---|
| 253 | """
|
|---|
| 254 |
|
|---|
| 255 |
|
|---|
| 256 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration):
|
|---|
| 257 | """A session configuration object in add mode.
|
|---|
| 258 | """
|
|---|
| 259 |
|
|---|
| 260 | academic_session = schema.Choice(
|
|---|
| 261 | title = _(u'Academic Session'),
|
|---|
| 262 | source = academic_sessions_vocab,
|
|---|
| 263 | default = None,
|
|---|
| 264 | required = True,
|
|---|
| 265 | readonly = False,
|
|---|
| 266 | )
|
|---|
| 267 |
|
|---|
| 268 | ICustomSessionConfigurationAdd[
|
|---|
| 269 | 'academic_session'].order = ICustomSessionConfiguration[
|
|---|
| 270 | 'academic_session'].order |
|---|