source: main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py @ 15284

Last change on this file since 15284 was 15181, checked in by Henrik Bettermann, 6 years ago

See ticket #513.

  • Property svn:keywords set to Id
File size: 8.5 KB
RevLine 
[13357]1## $Id: interfaces.py 15181 2018-10-02 15:03:19Z 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
19import zope.i18nmessageid
20from zope import schema
21from zc.sourcefactory.basic import BasicSourceFactory
22from waeup.kofa.interfaces import (SimpleKofaVocabulary,
[14700]23    ISessionConfiguration, academic_sessions_vocab,
24    ContextualDictSourceFactoryBase)
[13357]25
26_ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.aaue')
27
[14700]28class EnableScoreEditingGroupSource(ContextualDictSourceFactoryBase):
29    """A source for filtering groups of students
30    """
31    DICT_NAME = 'ENABLE_SCORE_EDITING_GROUP_DICT'
32
[13357]33# It's recommended to replicate all fields from the base package here.
34class ICustomSessionConfiguration(ISessionConfiguration):
35    """A session configuration object.
36    """
37
38    clearance_fee = schema.Float(
39        title = _(u'Regular Acceptance Fee'),
40        default = 0.0,
41        required = True,
42        )
43
44    clearance_fee_fp = schema.Float(
45        title = _(u'FP Acceptance Fee'),
46        default = 0.0,
47        required = True,
48        )
49
[14518]50    clearance_fee_ijmbe = schema.Float(
51        title = _(u'IJMBE Acceptance Fee'),
52        default = 0.0,
53        required = True,
54        )
55
[13678]56    clearance_fee_pg = schema.Float(
57        title = _(u'FT PG Acceptance Fee'),
[13377]58        default = 0.0,
59        required = True,
60        )
61
[13678]62    clearance_fee_ug_pt = schema.Float(
63        title = _(u'PT UG Acceptance Fee'),
[13377]64        default = 0.0,
65        required = True,
66        )
67
[13678]68    clearance_fee_pg_pt = schema.Float(
69        title = _(u'PT PG Acceptance Fee'),
[13525]70        default = 0.0,
71        required = True,
72        )
73
[13678]74    clearance_fee_med = schema.Float(
75        title = _(u'Medical Acceptance Fee'),
76        default = 0.0,
77        required = True,
78        )
79
[14954]80    clearance_fee_dp = schema.Float(
81        title = _(u'Diploma Acceptance Fee'),
82        default = 0.0,
83        required = True,
84        )
85
[13357]86    booking_fee = schema.Float(
87        title = _(u'Booking Fee'),
88        default = 0.0,
89        required = True,
90        )
91
[14296]92    transcript_fee_inter = schema.Float(
93        title = _(u'International Transcript Fee'),
[13357]94        default = 0.0,
95        required = True,
96        )
97
[14296]98    transcript_fee_local = schema.Float(
99        title = _(u'Local Transcript Fee'),
100        default = 0.0,
101        required = True,
102        )
103
[13357]104    # Additional fees in custom package
105
106    maint_fee = schema.Float(
107        title = _(u'Maintenance Fee'),
108        default = 0.0,
109        required = True,
110        )
111
112    transfer_fee = schema.Float(
113        title = _(u'Transfer Fee'),
114        default = 0.0,
115        required = True,
116        )
117
118    penalty_ug = schema.Float(
119        title = _(u'UG Penalty Fee'),
120        default = 0.0,
121        required = True,
122        )
123
124    penalty_pg = schema.Float(
125        title = _(u'PG Penalty Fee'),
126        default = 0.0,
127        required = True,
128        )
129
130    late_registration_fee = schema.Float(
131        title = _(u'Late Course Reg. Fee'),
132        default = 0.0,
133        required = True,
134        )
135
[14117]136    late_pg_registration_fee = schema.Float(
137        title = _(u'Late PG Course Reg. Fee'),
138        default = 0.0,
139        required = True,
140        )
141
[14234]142    id_card_fee = schema.Float(
143        title = _(u'Student ID Card Fee'),
144        default = 0.0,
145        required = True,
146        )
147
[13374]148    welfare_fee = schema.Float(
149        title = _(u'AAU Student Welfare Assurance Fee'),
150        default = 0.0,
151        required = True,
152        )
153
154    union_fee = schema.Float(
[13463]155        title = _(u'Student Union Due'),
[13374]156        default = 0.0,
157        required = True,
158        )
159
160    lapel_fee = schema.Float(
161        title = _(u'AAU Lapel/File Fee'),
162        default = 0.0,
163        required = True,
164        )
165
166    matric_gown_fee = schema.Float(
167        title = _(u'Matriculation Gown Fee'),
168        default = 0.0,
169        required = True,
170        )
171
172    concessional_fee = schema.Float(
173        title = _(u'Concessional Fee'),
174        default = 0.0,
175        required = True,
176        )
177
[14355]178    gst_text_book_0_fee = schema.Float(
179        title = _(u'Text Book Fee GST101 GST102 GST111 GST112'),
180        default = 0.0,
181        required = True,
182        )
183
[14258]184    gst_text_book_1_fee = schema.Float(
[14348]185        title = _(u'Text Book Fee GST101 and GST102'),
[14248]186        default = 0.0,
187        required = True,
188        )
189
[14258]190    gst_text_book_2_fee = schema.Float(
[14348]191        title = _(u'Text Book Fee GST111 and GST112'),
[14248]192        default = 0.0,
193        required = True,
194        )
195
[14258]196    gst_text_book_3_fee = schema.Float(
[14248]197        title = _(u'Text Book Fee GST222'),
198        default = 0.0,
199        required = True,
200        )
201
[14355]202    ent_text_book_1_fee = schema.Float(
[14248]203        title = _(u'Text Book Fee ENT201'),
204        default = 0.0,
205        required = True,
206        )
207
[14258]208    gst_registration_1_fee = schema.Float(
[14248]209        title = _(u'Registration Fee GST101 GST102 GST111 GST112'),
210        default = 0.0,
211        required = True,
212        )
213
[14258]214    gst_registration_2_fee = schema.Float(
[14248]215        title = _(u'Registration Fee GST222'),
216        default = 0.0,
217        required = True,
218        )
219
[14355]220    ent_registration_1_fee = schema.Float(
[14248]221        title = _(u'Registration Fee ENT201'),
222        default = 0.0,
223        required = True,
224        )
225
226    fac_dep_fee = schema.Float(
[14260]227        title = _(u'Faculty and Departmental Dues'),
[14248]228        default = 0.0,
229        required = True,
230        )
231
[14375]232    restitution_fee = schema.Float(
233        title = _(u'Restitution Fee'),
234        default = 0.0,
235        required = True,
236        )
237
[15180]238    sports_fee = schema.Float(
239        title = _(u'Sports Development Fee'),
240        default = 0.0,
241        required = True,
242        )
243
244    library_fee = schema.Float(
[15181]245        title = _(u'Library Development Fee UG'),
[15180]246        default = 0.0,
247        required = True,
248        )
249
[15181]250    library_fee_pg = schema.Float(
251        title = _(u'Library Development Fee PG'),
252        default = 0.0,
253        required = True,
254        )
255
[13357]256    coursereg_deadline = schema.Datetime(
[14117]257        title = _(u'FT Course Reg. Deadline'),
[13357]258        required = False,
259        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
260        )
261
[14117]262    coursereg_deadline_pg = schema.Datetime(
263        title = _(u'PG Course Reg. Deadline'),
264        required = False,
265        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
266        )
[13357]267
[14117]268    coursereg_deadline_pt = schema.Datetime(
269        title = _(u'PT Course Reg. Deadline'),
270        required = False,
271        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
272        )
273
274    coursereg_deadline_dp = schema.Datetime(
275        title = _(u'DP Course Reg. Deadline'),
276        required = False,
277        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
278        )
279
280    coursereg_deadline_found = schema.Datetime(
281        title = _(u'FOUND Course Reg. Deadline'),
282        required = False,
283        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
284        )
285
[14700]286    score_editing_enabled = schema.List(
287        title = _(u'Score editing enabled'),
288        value_type = schema.Choice(
289            source = EnableScoreEditingGroupSource(),
290            ),
291        required = False,
292        defaultFactory=list,
293        )
[14117]294
[14944]295    show_results = schema.List(
296        title = _(u'Show course results'),
297        value_type = schema.Choice(
298            source = EnableScoreEditingGroupSource(),
299            ),
300        required = False,
301        defaultFactory=list,
302        )
[14700]303
[14944]304
[13357]305    def getSessionString():
306        """Returns the session string from the vocabulary.
307        """
308
309
310class ICustomSessionConfigurationAdd(ICustomSessionConfiguration):
311    """A session configuration object in add mode.
312    """
313
314    academic_session = schema.Choice(
315        title = _(u'Academic Session'),
316        source = academic_sessions_vocab,
317        default = None,
318        required = True,
319        readonly = False,
320        )
321
322ICustomSessionConfigurationAdd[
323    'academic_session'].order =  ICustomSessionConfiguration[
[6923]324    'academic_session'].order
Note: See TracBrowser for help on using the repository browser.