source: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/export.py @ 9042

Last change on this file since 9042 was 9042, checked in by Henrik Bettermann, 12 years ago

Customize students exporters.

  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
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"""
20from kofacustom.nigeria.students.interfaces import (
21    INigeriaStudent, INigeriaStudentStudyCourse, INigeriaCourseTicket)
22from waeup.kofa.students.export import (
23    StudentsExporter, StudentStudyCourseExporter, CourseTicketExporter)
24from waeup.kofa.utils.helpers import iface_names
25
26class 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
36class 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
45class 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',)
Note: See TracBrowser for help on using the repository browser.