Ignore:
Timestamp:
27 Jun 2024, 09:18:42 (6 months ago)
Author:
Henrik Bettermann
Message:

Make _set_exporter_values customizable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r17810 r17823  
    43444344
    43454345    def _set_exporter_values(self):
    4346         # We provide all student exporters, nothing else, yet.
    4347         # Bursary, Department or Accommodation Officers don't
    4348         # have the general exportData
    4349         # permission and are only allowed to export bursary, payments
    4350         # overview or accommodation data respectively.
    4351         # This is the only place where waeup.exportAccommodationData,
    4352         # waeup.exportBursaryData and waeup.exportPaymentsOverview
    4353         # are used.
     4346        kofa_utils = getUtility(IKofaUtils)
     4347        exporters = kofa_utils.collect_exporters(self.context)
     4348        if exporters:
     4349            self.exporters = exporters
     4350            return
    43544351        exporters = []
    4355         if not checkPermission('waeup.exportData', self.context):
    4356             if checkPermission('waeup.exportBursaryData', self.context):
    4357                 exporters += [('Bursary Data', 'bursary')]
    4358             if checkPermission('waeup.exportPaymentsOverview', self.context):
    4359                 exporters += [('School Fee Payments Overview',
    4360                                'sfpaymentsoverview'),
    4361                               ('Session Payments Overview',
    4362                                'sessionpaymentsoverview')]
    4363             if checkPermission('waeup.exportAccommodationData', self.context):
    4364                 exporters += [('Bed Tickets', 'bedtickets'),
    4365                               ('Accommodation Payments',
    4366                                'accommodationpayments')]
    4367             self.exporters = exporters
    4368             return
    43694352        STUDENT_EXPORTER_NAMES = getUtility(
    43704353            IStudentsUtils).STUDENT_EXPORTER_NAMES
Note: See TracChangeset for help on using the changeset viewer.