Changeset 14436 for main/waeup.aaue/trunk/src
- Timestamp:
- 23 Jan 2017, 08:02:11 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/export.py
r14360 r14436 72 72 fields = tuple(sorted(iface_names( 73 73 ICustomStudentStudyLevel))) + ( 74 'student_id', 'number_of_tickets','certcode') 74 'student_id', 'matric_number', 'number_of_tickets','certcode', 'gpa') 75 76 def mangle_value(self, value, name, context=None): 77 """The mangler determines the student id, nothing else. 78 """ 79 if name in ('student_id', 'matric_number') and context is not None: 80 student = context.student 81 value = getattr(student, name, None) 82 return super( 83 CustomStudentStudyLevelExporter, self).mangle_value( 84 value, name, context=context) 75 85 76 86 class CustomStudentPaymentExporter(NigeriaStudentPaymentExporter): -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py
r14369 r14436 143 143 'total_credits_s1,total_credits_s2,' 144 144 'validated_by,validation_date,' 145 'student_id, number_of_tickets,certcode\r\n'146 '0.0,,,100,2012,A,100,,,,,A111111, 1,CERT1\r\n'145 'student_id,matric_number,number_of_tickets,certcode,gpa\r\n' 146 '0.0,,,100,2012,A,100,,,,,A111111,234,1,CERT1,0.0\r\n' 147 147 ) 148 148 return
Note: See TracChangeset for help on using the changeset viewer.