1 | ## $Id: export.py 9042 2012-07-23 20:31:08Z 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 | """Exporters for student related stuff. |
---|
19 | """ |
---|
20 | from kofacustom.nigeria.students.interfaces import ( |
---|
21 | INigeriaStudent, INigeriaStudentStudyCourse, INigeriaCourseTicket) |
---|
22 | from waeup.kofa.students.export import ( |
---|
23 | StudentsExporter, StudentStudyCourseExporter, CourseTicketExporter) |
---|
24 | from waeup.kofa.utils.helpers import iface_names |
---|
25 | |
---|
26 | class NigeriaStudentsExporter(StudentsExporter): |
---|
27 | """Exporter for Students. |
---|
28 | """ |
---|
29 | |
---|
30 | #: Fieldnames considered by this exporter |
---|
31 | fields = tuple(sorted(iface_names( |
---|
32 | INigeriaStudent, omit=['loggerInfo']))) + ( |
---|
33 | 'password', 'state', 'history', 'certcode') |
---|
34 | |
---|
35 | |
---|
36 | class NigeriaStudentStudyCourseExporter(StudentStudyCourseExporter): |
---|
37 | """Exporter for StudentStudyCourses. |
---|
38 | """ |
---|
39 | |
---|
40 | #: Fieldnames considered by this exporter |
---|
41 | fields = tuple( |
---|
42 | sorted(iface_names(INigeriaStudentStudyCourse))) + ('student_id',) |
---|
43 | |
---|
44 | |
---|
45 | class NigeriaCourseTicketExporter(CourseTicketExporter): |
---|
46 | """Exporter for CourseTickets. |
---|
47 | """ |
---|
48 | |
---|
49 | #: Fieldnames considered by this exporter |
---|
50 | fields = tuple(sorted(iface_names(INigeriaCourseTicket) + |
---|
51 | ['level', 'code', 'title', 'credits', |
---|
52 | 'passmark', 'semester', 'fcode', 'dcode'])) + ('student_id',) |
---|