- Timestamp:
- 29 Jul 2024, 14:01:38 (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/export.py
r17852 r17862 20 20 import grok 21 21 from datetime import datetime 22 from waeup.kofa.interfaces import IKofaUtils 23 from zope.component import getUtility 22 24 from waeup.uniben.students.interfaces import ( 23 25 ICustomStudent, … … 197 199 'lg_area', 198 200 'current_mode', 199 'cert code',201 'certificate', 200 202 'faccode', 201 203 'depcode', … … 204 206 'current_verdict', 205 207 'entry_session', 206 'faccode',207 'depcode',208 'certcode',209 208 'nysc_verdict', 210 209 'nysc_senate_info', … … 223 222 224 223 def mangle_value(self, value, name, context=None): 224 verdicts = getUtility(IKofaUtils).VERDICTS_DICT 225 225 if name in ('lg_state', 'lg_area') and context.lga: 226 226 value = context.lga … … 231 231 if name == 'lg_area': 232 232 value = '-'.join(value.split('_')[1:]) 233 if name == 'certificate': 234 cert = getattr(context.get('studycourse', None), 'certificate', None) 235 if cert is not None: 236 value = cert.title 237 if name == 'nysc_verdict' and value: 238 value = verdicts[value] 233 239 return super( 234 240 NYSCExporter, self).mangle_value(
Note: See TracChangeset for help on using the changeset viewer.