Ignore:
Timestamp:
8 Jan 2013, 11:38:14 (12 years ago)
Author:
Henrik Bettermann
Message:

Implement local student data exports in courses.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.py

    r9828 r9843  
    1919"""
    2020import grok
     21import zope.location.location
    2122from zope.catalog.interfaces import ICatalog
    2223from zope.interface import implementedBy
     
    2728from waeup.kofa.interfaces import IKofaPluggable
    2829from waeup.kofa.university.interfaces import ICourse, ICourseAdd
     30from waeup.kofa.utils.batching import VirtualExportJobContainer
     31
     32class VirtualCourseExportJobContainer(VirtualExportJobContainer):
     33    """A virtual export job container for courses.
     34    """
    2935
    3036class Course(grok.Model):
     
    5056        self.semester = semester
    5157        self.former_course = former_course
     58
     59    def traverse(self, name):
     60        """Deliver appropriate containers.
     61        """
     62        if name == 'exports':
     63            # create a virtual exports container and return it
     64            container = VirtualCourseExportJobContainer()
     65            zope.location.location.located(container, self, 'exports')
     66            return container
     67        return None
    5268
    5369    def longtitle(self):
Note: See TracChangeset for help on using the changeset viewer.