Changeset 7924
- Timestamp:
- 20 Mar 2012, 01:21:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py
r7914 r7924 73 73 74 74 #: Fieldnames considered by this exporter 75 fields = tuple( IApplicantBaseData.names())75 fields = tuple(sorted(IApplicantBaseData.names())) 76 76 77 77 #: The title under which this exporter will be displayed 78 78 title = _(u'Applicants') 79 79 80 def NOmangle_value(self, value, name, context=None): 81 if name == 'provider' and isinstance(value, tuple): 82 value = value[0] 80 def mangle_value(self, value, name, context=None): 81 if name in ( 82 'course1', 'course2', 'course_admitted') and value is not None: 83 value = value.code 84 elif name == 'school_grades': 85 value = [eval(entry.to_string()) for entry in value] 83 86 return super( 84 Applicants ContainerExporter, self).mangle_value(87 ApplicantsExporter, self).mangle_value( 85 88 value, name, context=context) 86 89 … … 105 108 return self.export([], filepath) 106 109 applicants = catalog.searchResults( 107 reg_number=(None, None)) 110 # reg_num might not be set and then would not be found. 111 # We therefore search for applicant_id. 112 applicant_id=(None, None)) 108 113 return self.export(applicants, filepath)
Note: See TracChangeset for help on using the changeset viewer.