Ignore:
Timestamp:
26 Sep 2013, 09:37:25 (11 years ago)
Author:
Henrik Bettermann
Message:

Implement an VirtualApplicantsExportJobContainer? which allows to export applicants locally. On each container page there is now an'Export applicants' button which directs to the exports overview page. Unlike student exporters, the applicants exporter can't be configured. It just exports all applicants in the container.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/container.py

    r9531 r10655  
    2323import pytz
    2424from datetime import datetime
     25import zope.location.location
    2526from zope.component import getUtility
    2627from zope.component.factory import Factory
     
    3132    IApplicantsUtils)
    3233from waeup.kofa.utils.helpers import attrs_to_fields
    33 
     34from waeup.kofa.utils.batching import VirtualExportJobContainer
    3435
    3536def generate_applicant_id(container=None):
     
    4243        # In some tests we don't use containers
    4344        return u"xxx_1234"
     45
     46class VirtualApplicantsExportJobContainer(VirtualExportJobContainer):
     47    """A virtual export job container for certificates.
     48    """
    4449
    4550class ApplicantsContainer(grok.Container):
     
    119124        return
    120125
     126    def traverse(self, name):
     127        """Deliver appropriate containers.
     128        """
     129        if name == 'exports':
     130            # create a virtual exports container and return it
     131            container = VirtualApplicantsExportJobContainer()
     132            zope.location.location.located(container, self, 'exports')
     133            return container
     134        return None
     135
    121136ApplicantsContainer = attrs_to_fields(ApplicantsContainer)
    122137
Note: See TracChangeset for help on using the changeset viewer.