| [13357] | 1 | ## $Id: interfaces.py 13525 2015-12-02 17:22:59Z 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 | |
|---|
| [13377] | 32 | |
|---|
| [13357] | 33 | application_fee = schema.Float( |
|---|
| 34 | title = _(u'Application Fee'), |
|---|
| 35 | default = 0.0, |
|---|
| 36 | required = True, |
|---|
| 37 | ) |
|---|
| 38 | |
|---|
| 39 | clearance_fee = schema.Float( |
|---|
| 40 | title = _(u'Regular Acceptance Fee'), |
|---|
| 41 | default = 0.0, |
|---|
| 42 | required = True, |
|---|
| 43 | ) |
|---|
| 44 | |
|---|
| 45 | clearance_fee_fp = schema.Float( |
|---|
| 46 | title = _(u'FP Acceptance Fee'), |
|---|
| 47 | default = 0.0, |
|---|
| 48 | required = True, |
|---|
| 49 | ) |
|---|
| 50 | |
|---|
| [13377] | 51 | clearance_fee_pt = schema.Float( |
|---|
| 52 | title = _(u'PT Acceptance Fee'), |
|---|
| 53 | default = 0.0, |
|---|
| 54 | required = True, |
|---|
| 55 | ) |
|---|
| 56 | |
|---|
| 57 | clearance_fee_med = schema.Float( |
|---|
| 58 | title = _(u'Medical Acceptance Fee'), |
|---|
| 59 | default = 0.0, |
|---|
| 60 | required = True, |
|---|
| 61 | ) |
|---|
| 62 | |
|---|
| [13525] | 63 | clearance_fee_pg = schema.Float( |
|---|
| 64 | title = _(u'Postgraduate Acceptance Fee'), |
|---|
| 65 | default = 0.0, |
|---|
| 66 | required = True, |
|---|
| 67 | ) |
|---|
| 68 | |
|---|
| [13357] | 69 | booking_fee = schema.Float( |
|---|
| 70 | title = _(u'Booking Fee'), |
|---|
| 71 | default = 0.0, |
|---|
| 72 | required = True, |
|---|
| 73 | ) |
|---|
| 74 | |
|---|
| 75 | transcript_fee = schema.Float( |
|---|
| 76 | title = _(u'Transcript Fee'), |
|---|
| 77 | default = 0.0, |
|---|
| 78 | required = True, |
|---|
| 79 | ) |
|---|
| 80 | |
|---|
| 81 | # Additional fees in custom package |
|---|
| 82 | |
|---|
| 83 | maint_fee = schema.Float( |
|---|
| 84 | title = _(u'Maintenance Fee'), |
|---|
| 85 | default = 0.0, |
|---|
| 86 | required = True, |
|---|
| 87 | ) |
|---|
| 88 | |
|---|
| 89 | transfer_fee = schema.Float( |
|---|
| 90 | title = _(u'Transfer Fee'), |
|---|
| 91 | default = 0.0, |
|---|
| 92 | required = True, |
|---|
| 93 | ) |
|---|
| 94 | |
|---|
| 95 | penalty_ug = schema.Float( |
|---|
| 96 | title = _(u'UG Penalty Fee'), |
|---|
| 97 | default = 0.0, |
|---|
| 98 | required = True, |
|---|
| 99 | ) |
|---|
| 100 | |
|---|
| 101 | penalty_pg = schema.Float( |
|---|
| 102 | title = _(u'PG Penalty Fee'), |
|---|
| 103 | default = 0.0, |
|---|
| 104 | required = True, |
|---|
| 105 | ) |
|---|
| 106 | |
|---|
| 107 | late_registration_fee = schema.Float( |
|---|
| 108 | title = _(u'Late Course Reg. Fee'), |
|---|
| 109 | default = 0.0, |
|---|
| 110 | required = True, |
|---|
| 111 | ) |
|---|
| 112 | |
|---|
| [13374] | 113 | welfare_fee = schema.Float( |
|---|
| 114 | title = _(u'AAU Student Welfare Assurance Fee'), |
|---|
| 115 | default = 0.0, |
|---|
| 116 | required = True, |
|---|
| 117 | ) |
|---|
| 118 | |
|---|
| 119 | union_fee = schema.Float( |
|---|
| [13463] | 120 | title = _(u'Student Union Due'), |
|---|
| [13374] | 121 | default = 0.0, |
|---|
| 122 | required = True, |
|---|
| 123 | ) |
|---|
| 124 | |
|---|
| 125 | lapel_fee = schema.Float( |
|---|
| 126 | title = _(u'AAU Lapel/File Fee'), |
|---|
| 127 | default = 0.0, |
|---|
| 128 | required = True, |
|---|
| 129 | ) |
|---|
| 130 | |
|---|
| 131 | matric_gown_fee = schema.Float( |
|---|
| 132 | title = _(u'Matriculation Gown Fee'), |
|---|
| 133 | default = 0.0, |
|---|
| 134 | required = True, |
|---|
| 135 | ) |
|---|
| 136 | |
|---|
| 137 | concessional_fee = schema.Float( |
|---|
| 138 | title = _(u'Concessional Fee'), |
|---|
| 139 | default = 0.0, |
|---|
| 140 | required = True, |
|---|
| 141 | ) |
|---|
| 142 | |
|---|
| [13357] | 143 | coursereg_deadline = schema.Datetime( |
|---|
| 144 | title = _(u'Course Reg. Deadline'), |
|---|
| 145 | required = False, |
|---|
| 146 | description = _('Example: ') + u'2011-12-31 23:59:59+01:00', |
|---|
| 147 | ) |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | def getSessionString(): |
|---|
| 151 | """Returns the session string from the vocabulary. |
|---|
| 152 | """ |
|---|
| 153 | |
|---|
| 154 | |
|---|
| 155 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
|---|
| 156 | """A session configuration object in add mode. |
|---|
| 157 | """ |
|---|
| 158 | |
|---|
| 159 | academic_session = schema.Choice( |
|---|
| 160 | title = _(u'Academic Session'), |
|---|
| 161 | source = academic_sessions_vocab, |
|---|
| 162 | default = None, |
|---|
| 163 | required = True, |
|---|
| 164 | readonly = False, |
|---|
| 165 | ) |
|---|
| 166 | |
|---|
| 167 | ICustomSessionConfigurationAdd[ |
|---|
| 168 | 'academic_session'].order = ICustomSessionConfiguration[ |
|---|
| [6923] | 169 | 'academic_session'].order |
|---|