[13357] | 1 | ## $Id: interfaces.py 14296 2016-11-28 12:10:49Z 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.aaue') |
---|
| 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 | clearance_fee = schema.Float( |
---|
| 33 | title = _(u'Regular Acceptance Fee'), |
---|
| 34 | default = 0.0, |
---|
| 35 | required = True, |
---|
| 36 | ) |
---|
| 37 | |
---|
| 38 | clearance_fee_fp = schema.Float( |
---|
| 39 | title = _(u'FP Acceptance Fee'), |
---|
| 40 | default = 0.0, |
---|
| 41 | required = True, |
---|
| 42 | ) |
---|
| 43 | |
---|
[13678] | 44 | clearance_fee_pg = schema.Float( |
---|
| 45 | title = _(u'FT PG Acceptance Fee'), |
---|
[13377] | 46 | default = 0.0, |
---|
| 47 | required = True, |
---|
| 48 | ) |
---|
| 49 | |
---|
[13678] | 50 | clearance_fee_ug_pt = schema.Float( |
---|
| 51 | title = _(u'PT UG Acceptance Fee'), |
---|
[13377] | 52 | default = 0.0, |
---|
| 53 | required = True, |
---|
| 54 | ) |
---|
| 55 | |
---|
[13678] | 56 | clearance_fee_pg_pt = schema.Float( |
---|
| 57 | title = _(u'PT PG Acceptance Fee'), |
---|
[13525] | 58 | default = 0.0, |
---|
| 59 | required = True, |
---|
| 60 | ) |
---|
| 61 | |
---|
[13678] | 62 | clearance_fee_med = schema.Float( |
---|
| 63 | title = _(u'Medical Acceptance Fee'), |
---|
| 64 | default = 0.0, |
---|
| 65 | required = True, |
---|
| 66 | ) |
---|
| 67 | |
---|
[13357] | 68 | booking_fee = schema.Float( |
---|
| 69 | title = _(u'Booking Fee'), |
---|
| 70 | default = 0.0, |
---|
| 71 | required = True, |
---|
| 72 | ) |
---|
| 73 | |
---|
[14296] | 74 | transcript_fee_inter = schema.Float( |
---|
| 75 | title = _(u'International Transcript Fee'), |
---|
[13357] | 76 | default = 0.0, |
---|
| 77 | required = True, |
---|
| 78 | ) |
---|
| 79 | |
---|
[14296] | 80 | transcript_fee_local = schema.Float( |
---|
| 81 | title = _(u'Local Transcript Fee'), |
---|
| 82 | default = 0.0, |
---|
| 83 | required = True, |
---|
| 84 | ) |
---|
| 85 | |
---|
[13357] | 86 | # Additional fees in custom package |
---|
| 87 | |
---|
| 88 | maint_fee = schema.Float( |
---|
| 89 | title = _(u'Maintenance Fee'), |
---|
| 90 | default = 0.0, |
---|
| 91 | required = True, |
---|
| 92 | ) |
---|
| 93 | |
---|
| 94 | transfer_fee = schema.Float( |
---|
| 95 | title = _(u'Transfer Fee'), |
---|
| 96 | default = 0.0, |
---|
| 97 | required = True, |
---|
| 98 | ) |
---|
| 99 | |
---|
| 100 | penalty_ug = schema.Float( |
---|
| 101 | title = _(u'UG Penalty Fee'), |
---|
| 102 | default = 0.0, |
---|
| 103 | required = True, |
---|
| 104 | ) |
---|
| 105 | |
---|
| 106 | penalty_pg = schema.Float( |
---|
| 107 | title = _(u'PG Penalty Fee'), |
---|
| 108 | default = 0.0, |
---|
| 109 | required = True, |
---|
| 110 | ) |
---|
| 111 | |
---|
| 112 | late_registration_fee = schema.Float( |
---|
| 113 | title = _(u'Late Course Reg. Fee'), |
---|
| 114 | default = 0.0, |
---|
| 115 | required = True, |
---|
| 116 | ) |
---|
| 117 | |
---|
[14117] | 118 | late_pg_registration_fee = schema.Float( |
---|
| 119 | title = _(u'Late PG Course Reg. Fee'), |
---|
| 120 | default = 0.0, |
---|
| 121 | required = True, |
---|
| 122 | ) |
---|
| 123 | |
---|
[14234] | 124 | id_card_fee = schema.Float( |
---|
| 125 | title = _(u'Student ID Card Fee'), |
---|
| 126 | default = 0.0, |
---|
| 127 | required = True, |
---|
| 128 | ) |
---|
| 129 | |
---|
[13374] | 130 | welfare_fee = schema.Float( |
---|
| 131 | title = _(u'AAU Student Welfare Assurance Fee'), |
---|
| 132 | default = 0.0, |
---|
| 133 | required = True, |
---|
| 134 | ) |
---|
| 135 | |
---|
| 136 | union_fee = schema.Float( |
---|
[13463] | 137 | title = _(u'Student Union Due'), |
---|
[13374] | 138 | default = 0.0, |
---|
| 139 | required = True, |
---|
| 140 | ) |
---|
| 141 | |
---|
| 142 | lapel_fee = schema.Float( |
---|
| 143 | title = _(u'AAU Lapel/File Fee'), |
---|
| 144 | default = 0.0, |
---|
| 145 | required = True, |
---|
| 146 | ) |
---|
| 147 | |
---|
| 148 | matric_gown_fee = schema.Float( |
---|
| 149 | title = _(u'Matriculation Gown Fee'), |
---|
| 150 | default = 0.0, |
---|
| 151 | required = True, |
---|
| 152 | ) |
---|
| 153 | |
---|
| 154 | concessional_fee = schema.Float( |
---|
| 155 | title = _(u'Concessional Fee'), |
---|
| 156 | default = 0.0, |
---|
| 157 | required = True, |
---|
| 158 | ) |
---|
| 159 | |
---|
[14258] | 160 | gst_text_book_1_fee = schema.Float( |
---|
[14248] | 161 | title = _(u'Text Book Fee GST101 GST102'), |
---|
| 162 | default = 0.0, |
---|
| 163 | required = True, |
---|
| 164 | ) |
---|
| 165 | |
---|
[14258] | 166 | gst_text_book_2_fee = schema.Float( |
---|
[14248] | 167 | title = _(u'Text Book Fee GST111 GST112'), |
---|
| 168 | default = 0.0, |
---|
| 169 | required = True, |
---|
| 170 | ) |
---|
| 171 | |
---|
[14258] | 172 | gst_text_book_3_fee = schema.Float( |
---|
[14248] | 173 | title = _(u'Text Book Fee GST222'), |
---|
| 174 | default = 0.0, |
---|
| 175 | required = True, |
---|
| 176 | ) |
---|
| 177 | |
---|
[14258] | 178 | ent_text_book_4_fee = schema.Float( |
---|
[14248] | 179 | title = _(u'Text Book Fee ENT201'), |
---|
| 180 | default = 0.0, |
---|
| 181 | required = True, |
---|
| 182 | ) |
---|
| 183 | |
---|
[14258] | 184 | gst_registration_1_fee = schema.Float( |
---|
[14248] | 185 | title = _(u'Registration Fee GST101 GST102 GST111 GST112'), |
---|
| 186 | default = 0.0, |
---|
| 187 | required = True, |
---|
| 188 | ) |
---|
| 189 | |
---|
[14258] | 190 | gst_registration_2_fee = schema.Float( |
---|
[14248] | 191 | title = _(u'Registration Fee GST222'), |
---|
| 192 | default = 0.0, |
---|
| 193 | required = True, |
---|
| 194 | ) |
---|
| 195 | |
---|
[14258] | 196 | ent_registration_3_fee = schema.Float( |
---|
[14248] | 197 | title = _(u'Registration Fee ENT201'), |
---|
| 198 | default = 0.0, |
---|
| 199 | required = True, |
---|
| 200 | ) |
---|
| 201 | |
---|
| 202 | fac_dep_fee = schema.Float( |
---|
[14260] | 203 | title = _(u'Faculty and Departmental Dues'), |
---|
[14248] | 204 | default = 0.0, |
---|
| 205 | required = True, |
---|
| 206 | ) |
---|
| 207 | |
---|
[13357] | 208 | coursereg_deadline = schema.Datetime( |
---|
[14117] | 209 | title = _(u'FT Course Reg. Deadline'), |
---|
[13357] | 210 | required = False, |
---|
| 211 | description = _('Example: ') + u'2011-12-31 23:59:59+01:00', |
---|
| 212 | ) |
---|
| 213 | |
---|
[14117] | 214 | coursereg_deadline_pg = schema.Datetime( |
---|
| 215 | title = _(u'PG Course Reg. Deadline'), |
---|
| 216 | required = False, |
---|
| 217 | description = _('Example: ') + u'2011-12-31 23:59:59+01:00', |
---|
| 218 | ) |
---|
[13357] | 219 | |
---|
[14117] | 220 | coursereg_deadline_pt = schema.Datetime( |
---|
| 221 | title = _(u'PT Course Reg. Deadline'), |
---|
| 222 | required = False, |
---|
| 223 | description = _('Example: ') + u'2011-12-31 23:59:59+01:00', |
---|
| 224 | ) |
---|
| 225 | |
---|
| 226 | coursereg_deadline_dp = schema.Datetime( |
---|
| 227 | title = _(u'DP Course Reg. Deadline'), |
---|
| 228 | required = False, |
---|
| 229 | description = _('Example: ') + u'2011-12-31 23:59:59+01:00', |
---|
| 230 | ) |
---|
| 231 | |
---|
| 232 | coursereg_deadline_found = schema.Datetime( |
---|
| 233 | title = _(u'FOUND Course Reg. Deadline'), |
---|
| 234 | required = False, |
---|
| 235 | description = _('Example: ') + u'2011-12-31 23:59:59+01:00', |
---|
| 236 | ) |
---|
| 237 | |
---|
| 238 | |
---|
[13357] | 239 | def getSessionString(): |
---|
| 240 | """Returns the session string from the vocabulary. |
---|
| 241 | """ |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
| 245 | """A session configuration object in add mode. |
---|
| 246 | """ |
---|
| 247 | |
---|
| 248 | academic_session = schema.Choice( |
---|
| 249 | title = _(u'Academic Session'), |
---|
| 250 | source = academic_sessions_vocab, |
---|
| 251 | default = None, |
---|
| 252 | required = True, |
---|
| 253 | readonly = False, |
---|
| 254 | ) |
---|
| 255 | |
---|
| 256 | ICustomSessionConfigurationAdd[ |
---|
| 257 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
[6923] | 258 | 'academic_session'].order |
---|