Ignore:
Timestamp:
26 Feb 2015, 07:35:00 (10 years ago)
Author:
Henrik Bettermann
Message:

Add components to configure a student export jobs in faculties.

File:
1 edited

Legend:

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

    r10684 r12632  
    2020
    2121import grok
     22import zope.location.location
    2223from zope.component.interfaces import IFactory
    2324from zope.interface import implementedBy
    2425from zope.component import getUtility
    2526from waeup.kofa.interfaces import IKofaUtils
     27from waeup.kofa.utils.batching import VirtualExportJobContainer
    2628from waeup.kofa.university.interfaces import (
    2729    IFaculty, IDepartment)
     
    3436        insttypes_dict[inst.title_prefix],
    3537        inst.title, inst.code)
     38
     39class VirtualFacultyExportJobContainer(VirtualExportJobContainer):
     40    """A virtual export job container for facultiess.
     41    """
    3642
    3743class Faculty(grok.Container):
     
    6773        self.code = code
    6874
     75    def traverse(self, name):
     76        """Deliver appropriate containers.
     77        """
     78        if name == 'exports':
     79            # create a virtual exports container and return it
     80            container = VirtualFacultyExportJobContainer()
     81            zope.location.location.located(container, self, 'exports')
     82            return container
     83        return None
     84
    6985    def addDepartment(self, department):
    7086        """Add a department to the faculty.
Note: See TracChangeset for help on using the changeset viewer.