Changeset 16617


Ignore:
Timestamp:
14 Sep 2021, 20:15:15 (3 years ago)
Author:
Henrik Bettermann
Message:

Export total_credits, see #672.

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

    r16039 r16617  
    7070        ['level', 'code', 'level_session'])) + ('student_id',
    7171        'certcode', 'display_fullname', 'matric_number', 'state', 'grade',
    72         'total_score')
     72        'total_score', 'total_credits')
    7373
    7474    def mangle_value(self, value, name, context=None):
     
    8080                and student is not None:
    8181                value = getattr(student, name, None)
     82            if name == 'total_credits':
     83                value = context.__parent__.total_credits
    8284        return ExporterBase().mangle_value(value, name, context=context)
    8385
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py

    r16549 r16617  
    194194            'automatic,ca,carry_over,code,course_category,credits,dcode,fcode,imported_ts,level,level_session,'
    195195            'mandatory,outstanding,passmark,score,semester,ticket_session,title,student_id,certcode,'
    196             'display_fullname,matric_number,state,grade,total_score\r\n'
     196            'display_fullname,matric_number,state,grade,total_score,total_credits\r\n'
    197197            '1,,1,CRS1,,100,DEP1,FAC1,,100,2012,0,0,100,,2,,Course 1,A111111,CERT1,'
    198             '"TESTER, Anna M.",234,created,,\r\n'
     198            '"TESTER, Anna M.",234,created,,,100\r\n'
    199199            )
    200200        return
Note: See TracChangeset for help on using the changeset viewer.