source: main/waeup.custom/trunk/src/waeup/custom/students/interfaces.py @ 7512

Last change on this file since 7512 was 7505, checked in by Henrik Bettermann, 13 years ago

Start customization of student components.

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1## $Id: interfaces.py 7505 2012-01-25 06:33:57Z henrik $
2##
3## Copyright (C) 2012 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##
18from zope import schema
19from waeup.sirp.interfaces import SimpleSIRPVocabulary
20from waeup.sirp.students.interfaces import (
21    IStudentBase,IStudentClearance,IStudentPersonal,IStudentNavigation,
22    )
23
24class IStudentPersonal(IStudentPersonal):
25    """Student personal data.
26
27    """
28    perm_address = schema.Text(
29        title = u'Permanent Address',
30        required = False,
31        )
32
33    marit_stat = schema.Choice(
34        title = u'Maritual Status',
35        default = 'unmarried',
36        required = False,
37        vocabulary = SimpleSIRPVocabulary(
38            ('Unmarried', 'unmarried'),
39            ('Married', 'married'),)
40        )
41
42class IStudentClearance(IStudentClearance):
43    """Representation of student clearance data.
44
45    """
46    date_of_birth = schema.Date(
47        title = u'Date of Birth',
48        required = True,
49        )
50
51    clearance_locked = schema.Bool(
52        title = u'Clearance form locked',
53        default = False,
54        )
55
56    clr_code = schema.TextLine(
57        title = u'CLR Activation Code',
58        default = u'',
59        required = False,
60        readonly = True,
61        )
62
63class IStudent(IStudentBase,IStudentClearance,IStudentPersonal):
64    """Representation of a student.
65
66    """
67
68# Interfaces for students only
69
70class IStudentClearanceEdit(IStudentClearance):
71    """Interface needed for restricted editing of student clearance data.
72
73    """
74
75class IStudentPersonalEdit(IStudentPersonal):
76    """Interface needed for restricted editing of student personal data.
77
78    """
Note: See TracBrowser for help on using the repository browser.