Changeset 17905 for main/waeup.uniben
- Timestamp:
- 28 Aug 2024, 07:48:13 (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/export.py
r17897 r17905 19 19 """ 20 20 import grok 21 import os 21 22 from datetime import datetime 22 from waeup.kofa.interfaces import IKofaUtils 23 from waeup.kofa.interfaces import ( 24 IExtFileStore, IFileStoreNameChooser, IKofaUtils) 23 25 from zope.component import getUtility 24 26 from waeup.uniben.students.interfaces import ( … … 85 87 'former_matric', 86 88 'hq_matric_no', 87 'hq2_matric_no') 89 'hq2_matric_no', 90 'routing_slip_path') 91 92 def mangle_value(self, value, name, context=None): 93 if name == 'routing_slip_path': 94 file_id = IFileStoreNameChooser(context).chooseName( 95 attr='routingslip.pdf') 96 os_path = getUtility(IExtFileStore)._pathFromFileID(file_id) 97 if not os.path.exists(os_path): 98 value = None 99 else: 100 value = '/'.join(os_path.split('/')[-4:]) 101 return super( 102 CustomTrimmedDataExporter, self).mangle_value( 103 value, name, context=context) 104 88 105 89 106 class CustomStudentStudyCourseExporter(NigeriaStudentStudyCourseExporter):
Note: See TracChangeset for help on using the changeset viewer.