source: main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py @ 8053

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

Adapt changes recently made in the base package.

  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1## $Id: interfaces.py 7995 2012-03-28 06:23:25Z 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.kofa.schema import TextLineChoice
20from waeup.kofa.interfaces import SimpleKofaVocabulary
21from waeup.kofa.students.interfaces import (
22    IStudentBase,IUGStudentClearance,IPGStudentClearance,
23    IStudentPersonal,IStudentNavigation,
24    )
25from waeup.kofa.students.vocabularies import (
26    lgas_vocab, nats_vocab, contextual_reg_num_source)
27
28class IStudentBase(IStudentBase):
29    """Representation of student base data.
30
31    """
32
33    reg_number = TextLineChoice(
34        title = u'Registration Number',
35        required = False,
36        readonly = False,
37        source = contextual_reg_num_source,
38        )
39
40class IStudentPersonal(IStudentPersonal):
41    """Student personal data.
42
43    """
44
45    marit_stat = schema.Choice(
46        title = u'Maritual Status',
47        default = 'unmarried',
48        required = False,
49        vocabulary = SimpleKofaVocabulary(
50            ('Unmarried', 'unmarried'),
51            ('Married', 'married'),)
52        )
53
54class IUGStudentClearance(IUGStudentClearance):
55    """Representation of ug student clearance data.
56
57    """
58    date_of_birth = schema.Date(
59        title = u'Date of Birth',
60        required = False,
61        )
62
63    nationality = schema.Choice(
64        source = nats_vocab,
65        title = u'Nationality',
66        default = 'nigeria',
67        required = False,
68        )
69
70    lga = schema.Choice(
71        source = lgas_vocab,
72        title = u'State/LGA',
73        required = False,
74        )
75
76class IPGStudentClearance(IUGStudentClearance):
77    """Representation of pg student clearance data.
78
79    """
80
81class IStudent(IStudentBase,IUGStudentClearance,IPGStudentClearance,IStudentPersonal):
82    """Representation of a student.
83
84    """
Note: See TracBrowser for help on using the repository browser.