[7419] | 1 | ## $Id: interfaces.py 11678 2014-06-03 15:21:22Z henrik $
|
---|
[6923] | 2 | ##
|
---|
[7419] | 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 | ##
|
---|
[7695] | 18 |
|
---|
| 19 | import zope.i18nmessageid
|
---|
[6923] | 20 | from zope import schema
|
---|
[8504] | 21 | from zc.sourcefactory.basic import BasicSourceFactory
|
---|
[8071] | 22 | from waeup.kofa.interfaces import (SimpleKofaVocabulary,
|
---|
[7505] | 23 | ISessionConfiguration, academic_sessions_vocab)
|
---|
[6923] | 24 |
|
---|
[9347] | 25 | _ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.kwarapoly')
|
---|
[7695] | 26 |
|
---|
[7021] | 27 | # It's recommended to replicate all fields from the base package here.
|
---|
[8204] | 28 | class ICustomSessionConfiguration(ISessionConfiguration):
|
---|
[6923] | 29 | """A session configuration object.
|
---|
| 30 | """
|
---|
| 31 |
|
---|
[7880] | 32 | # Base fees, do not remove.
|
---|
| 33 |
|
---|
[7928] | 34 | school_fee_base = schema.Float(
|
---|
[7695] | 35 | title = _(u'School Fee (ignored)'),
|
---|
[7928] | 36 | default = 0.0,
|
---|
[11623] | 37 | required = True,
|
---|
[6923] | 38 | )
|
---|
| 39 |
|
---|
[8263] | 40 | application_fee = schema.Float(
|
---|
[8537] | 41 | title = _(u'Application Fee (fallback)'),
|
---|
[7928] | 42 | default = 0.0,
|
---|
[11623] | 43 | required = True,
|
---|
[6923] | 44 | )
|
---|
| 45 |
|
---|
[7928] | 46 | clearance_fee = schema.Float(
|
---|
[9143] | 47 | title = _(u'Clearance Fee'),
|
---|
[7928] | 48 | default = 0.0,
|
---|
[11623] | 49 | required = True,
|
---|
[6923] | 50 | )
|
---|
| 51 |
|
---|
[7928] | 52 | booking_fee = schema.Float(
|
---|
[7695] | 53 | title = _(u'Booking Fee'),
|
---|
[7928] | 54 | default = 0.0,
|
---|
[11623] | 55 | required = True,
|
---|
[6923] | 56 | )
|
---|
| 57 |
|
---|
[8441] | 58 | # Additional fees in custom package
|
---|
[7880] | 59 |
|
---|
[7928] | 60 | maint_fee = schema.Float(
|
---|
[10682] | 61 | title = _(u'Maintenance Fee (fallback)'),
|
---|
[7928] | 62 | default = 0.0,
|
---|
[11623] | 63 | required = True,
|
---|
[6950] | 64 | )
|
---|
[9317] | 65 | gown_fee = schema.Float(
|
---|
[7695] | 66 | title = _(u'Gown Fee'),
|
---|
[7928] | 67 | default = 0.0,
|
---|
[11623] | 68 | required = True,
|
---|
[7021] | 69 | )
|
---|
[9317] | 70 | transfer_fee = schema.Float(
|
---|
[7695] | 71 | title = _(u'Transfer Fee'),
|
---|
[7928] | 72 | default = 0.0,
|
---|
[11623] | 73 | required = True,
|
---|
[7021] | 74 | )
|
---|
[10734] | 75 | certificate_fee = schema.Float(
|
---|
[11678] | 76 | title = _(u'ND Certificate Fee'),
|
---|
[10734] | 77 | default = 0.0,
|
---|
[11623] | 78 | required = True,
|
---|
[10734] | 79 | )
|
---|
[11678] | 80 | hnd_certificate_fee = schema.Float(
|
---|
| 81 | title = _(u'HND Certificate Fee'),
|
---|
| 82 | default = 0.0,
|
---|
| 83 | required = True,
|
---|
| 84 | )
|
---|
[10734] | 85 | state_result_fee = schema.Float(
|
---|
[11629] | 86 | title = _(u'ND Statement of Result Fee'),
|
---|
[10734] | 87 | default = 0.0,
|
---|
[11623] | 88 | required = True,
|
---|
[10734] | 89 | )
|
---|
[11629] | 90 | hnd_state_result_fee = schema.Float(
|
---|
| 91 | title = _(u'HND Statement of Result Fee'),
|
---|
| 92 | default = 0.0,
|
---|
| 93 | required = True,
|
---|
| 94 | )
|
---|
[10734] | 95 | transcript_local_fee = schema.Float(
|
---|
[11629] | 96 | title = _(u'ND Transcript (local) Fee'),
|
---|
[10734] | 97 | default = 0.0,
|
---|
[11623] | 98 | required = True,
|
---|
[10734] | 99 | )
|
---|
[11629] | 100 | hnd_transcript_local_fee = schema.Float(
|
---|
| 101 | title = _(u'HND Transcript (local) Fee'),
|
---|
| 102 | default = 0.0,
|
---|
| 103 | required = True,
|
---|
| 104 | )
|
---|
[10734] | 105 | transcript_foreign_fee = schema.Float(
|
---|
[11629] | 106 | title = _(u'ND Transcript (foreign) Fee'),
|
---|
[10734] | 107 | default = 0.0,
|
---|
[11623] | 108 | required = True,
|
---|
[10734] | 109 | )
|
---|
[11629] | 110 | hnd_transcript_foreign_fee = schema.Float(
|
---|
| 111 | title = _(u'HND Transcript (foreign) Fee'),
|
---|
| 112 | default = 0.0,
|
---|
| 113 | required = True,
|
---|
| 114 | )
|
---|
[10734] | 115 | ver_result_fee = schema.Float(
|
---|
[10844] | 116 | title = _(u'Verification of Result Fee'),
|
---|
[10734] | 117 | default = 0.0,
|
---|
[11623] | 118 | required = True,
|
---|
[10734] | 119 | )
|
---|
| 120 | change_course_fee = schema.Float(
|
---|
| 121 | title = _(u'Change of Course Fee'),
|
---|
| 122 | default = 0.0,
|
---|
[11623] | 123 | required = True,
|
---|
[10734] | 124 | )
|
---|
| 125 | change_inst_fee = schema.Float(
|
---|
| 126 | title = _(u'Change of Institute Fee'),
|
---|
| 127 | default = 0.0,
|
---|
[11623] | 128 | required = True,
|
---|
[10734] | 129 | )
|
---|
| 130 | jamb_reject_fee = schema.Float(
|
---|
| 131 | title = _(u'JAMB Rejection Form Fee'),
|
---|
| 132 | default = 0.0,
|
---|
[11623] | 133 | required = True,
|
---|
[10734] | 134 | )
|
---|
| 135 | cert_of_cert_fee = schema.Float(
|
---|
| 136 | title = _(u'Certification of Certificate Fee'),
|
---|
| 137 | default = 0.0,
|
---|
[11623] | 138 | required = True,
|
---|
[10734] | 139 | )
|
---|
| 140 | ref_let_fee = schema.Float(
|
---|
| 141 | title = _(u'Recommendation/Reference Letter Fee'),
|
---|
| 142 | default = 0.0,
|
---|
[11623] | 143 | required = True,
|
---|
[10734] | 144 | )
|
---|
| 145 | proc_cert_fee = schema.Float(
|
---|
| 146 | title = _(u'Processing of Certificate by Proxy Fee'),
|
---|
| 147 | default = 0.0,
|
---|
[11623] | 148 | required = True,
|
---|
[10734] | 149 | )
|
---|
| 150 | loss_idcard_fee = schema.Float(
|
---|
[11629] | 151 | title = _(u'Loss of ID Card Fee (student)'),
|
---|
[10734] | 152 | default = 0.0,
|
---|
[11623] | 153 | required = True,
|
---|
[10734] | 154 | )
|
---|
[11629] | 155 | staff_loss_idcard_fee = schema.Float(
|
---|
| 156 | title = _(u'Loss of ID Card Fee (staff)'),
|
---|
| 157 | default = 0.0,
|
---|
| 158 | required = True,
|
---|
| 159 | )
|
---|
[10734] | 160 | loss_examcard_fee = schema.Float(
|
---|
| 161 | title = _(u'Loss of Exam Card Fee'),
|
---|
| 162 | default = 0.0,
|
---|
[11623] | 163 | required = True,
|
---|
[10734] | 164 | )
|
---|
| 165 | loss_result_fee = schema.Float(
|
---|
| 166 | title = _(u'Loss of Result Fee'),
|
---|
| 167 | default = 0.0,
|
---|
[11623] | 168 | required = True,
|
---|
[10734] | 169 | )
|
---|
| 170 | loss_receipt_fee = schema.Float(
|
---|
| 171 | title = _(u'Loss of Receipt Fee'),
|
---|
| 172 | default = 0.0,
|
---|
[11623] | 173 | required = True,
|
---|
[10734] | 174 | )
|
---|
| 175 | loss_clearance_fee = schema.Float(
|
---|
| 176 | title = _(u'Loss of Clearance Fee'),
|
---|
| 177 | default = 0.0,
|
---|
[11623] | 178 | required = True,
|
---|
[10734] | 179 | )
|
---|
| 180 | conv_brochure_fee = schema.Float(
|
---|
[11629] | 181 | title = _(u'ND Convocation Brochure Fee'),
|
---|
[10734] | 182 | default = 0.0,
|
---|
[11623] | 183 | required = True,
|
---|
[10734] | 184 | )
|
---|
[11629] | 185 | hnd_conv_brochure_fee = schema.Float(
|
---|
| 186 | title = _(u'HND Convocation Brochure Fee'),
|
---|
| 187 | default = 0.0,
|
---|
| 188 | required = True,
|
---|
| 189 | )
|
---|
[11065] | 190 | penalty_ug = schema.Float(
|
---|
| 191 | title = _(u'UG Penalty Fee'),
|
---|
| 192 | default = 0.0,
|
---|
[11623] | 193 | required = True,
|
---|
[11065] | 194 | )
|
---|
| 195 | penalty_pg = schema.Float(
|
---|
| 196 | title = _(u'PG Penalty Fee'),
|
---|
| 197 | default = 0.0,
|
---|
[11623] | 198 | required = True,
|
---|
[11065] | 199 | )
|
---|
| 200 |
|
---|
[6923] | 201 | def getSessionString():
|
---|
| 202 | """Returns the session string from the vocabulary.
|
---|
| 203 | """
|
---|
| 204 |
|
---|
| 205 |
|
---|
[8253] | 206 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration):
|
---|
[6923] | 207 | """A session configuration object in add mode.
|
---|
| 208 | """
|
---|
| 209 |
|
---|
| 210 | academic_session = schema.Choice(
|
---|
[7695] | 211 | title = _(u'Academic Session'),
|
---|
[6923] | 212 | source = academic_sessions_vocab,
|
---|
| 213 | default = None,
|
---|
| 214 | required = True,
|
---|
| 215 | readonly = False,
|
---|
| 216 | )
|
---|
| 217 |
|
---|
[8204] | 218 | ICustomSessionConfigurationAdd[
|
---|
| 219 | 'academic_session'].order = ICustomSessionConfiguration[
|
---|
[6923] | 220 | 'academic_session'].order |
---|