Changeset 14442


Ignore:
Timestamp:
23 Jan 2017, 11:08:52 (8 years ago)
Author:
Henrik Bettermann
Message:

Export cgpa not gpa twice.

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

    r14436 r14442  
    7272    fields = tuple(sorted(iface_names(
    7373        ICustomStudentStudyLevel))) + (
    74         'student_id', 'matric_number', 'number_of_tickets','certcode', 'gpa')
     74        'student_id', 'matric_number', 'number_of_tickets','certcode', 'cgpa')
    7575
    7676    def mangle_value(self, value, name, context=None):
     
    8080            student = context.student
    8181            value = getattr(student, name, None)
     82        elif name == 'cgpa':
     83            value = context.cumulative_params[0]
    8284        return super(
    8385            CustomStudentStudyLevelExporter, self).mangle_value(
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py

    r14436 r14442  
    143143            'total_credits_s1,total_credits_s2,'
    144144            'validated_by,validation_date,'
    145             'student_id,matric_number,number_of_tickets,certcode,gpa\r\n'
     145            'student_id,matric_number,number_of_tickets,certcode,cgpa\r\n'
    146146            '0.0,,,100,2012,A,100,,,,,A111111,234,1,CERT1,0.0\r\n'
    147147            )
Note: See TracChangeset for help on using the changeset viewer.