Ignore:
Timestamp:
11 Apr 2021, 10:17:28 (4 years ago)
Author:
Henrik Bettermann
Message:

Add key field to CertificateExporter.

Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r16431 r16450  
    441.6.1.dev0 (unreleased)
    55=======================
     6
     7* Add `key` to `CertificateExporter`.
    68
    79* Add payment option (`p_option`) field to payment tickets and add
  • main/waeup.kofa/trunk/src/waeup/kofa/university/export.py

    r15496 r16450  
    166166
    167167    fields = ('code', 'faculty_code', 'department_code', 'title', 'study_mode',
    168               'degree',
     168              'degree','key',
    169169              'start_level', 'end_level', 'application_category', 'ratio',
    170170              'school_fee_1', 'school_fee_2', 'school_fee_3', 'school_fee_4',
     
    179179        which is the code of the department that offers the certificate.
    180180        """
     181        if name == 'key':
     182            value = context.__name__
    181183        return super(CertificateExporter, self).mangle_value(
    182184            value, name, context)
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py

    r15496 r16450  
    400400            result,
    401401            'code,faculty_code,department_code,title,study_mode,'
    402             'degree,start_level,'
     402            'degree,key,start_level,'
    403403            'end_level,application_category,ratio,school_fee_1,'
    404404            'school_fee_2,school_fee_3,school_fee_4,'
     
    406406            'custom_float_1,custom_float_2,'
    407407            'users_with_local_roles\r\n'
    408             'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,'
     408            'CERT1,F1,D1,Master of Cheese,ct_ft,,CERT1,100,300,basic,,,,,,,,,,'
    409409            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    410410            )
     
    418418            result,
    419419            'code,faculty_code,department_code,title,study_mode,'
    420             'degree,start_level,'
     420            'degree,key,start_level,'
    421421            'end_level,application_category,ratio,school_fee_1,'
    422422            'school_fee_2,school_fee_3,school_fee_4,'
     
    424424            'custom_float_1,custom_float_2,'
    425425            'users_with_local_roles\r\n'
    426             'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,'
     426            'CERT1,F1,D1,Master of Cheese,ct_ft,,CERT1,100,300,basic,,,,,,,,,,'
    427427            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    428             'CERT2,F1,D1,Master of Cheddar,ct_ft,,400,700,cest,,,,,,,,,,[]\r\n'
     428            'CERT2,F1,D1,Master of Cheddar,ct_ft,,CERT2,400,700,cest,,,,,,,,,,[]\r\n'
    429429            )
    430430        return
     
    438438            result,
    439439            'code,faculty_code,department_code,title,study_mode,'
    440             'degree,start_level,'
     440            'degree,key,start_level,'
    441441            'end_level,application_category,ratio,'
    442442            'school_fee_1,school_fee_2,school_fee_3,school_fee_4,'
     
    444444            'custom_float_1,custom_float_2,'
    445445            'users_with_local_roles\r\n'
    446             'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,'
     446            'CERT1,F1,D1,Master of Cheese,ct_ft,,CERT1,100,300,basic,,,,,,,,,,'
    447447            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    448             'CERT2,F1,D1,Master of Cheddar,ct_ft,,400,700,cest,,,,,,,,,,[]\r\n'
    449             'CERT3,F1,D2,Cert. of Rubbish,dp_pt,,100,200,no,,,,,,,,,,[]\r\n'
     448            'CERT2,F1,D1,Master of Cheddar,ct_ft,,CERT2,400,700,cest,,,,,,,,,,[]\r\n'
     449            'CERT3,F1,D2,Cert. of Rubbish,dp_pt,,CERT3,100,200,no,,,,,,,,,,[]\r\n'
    450450            )
    451451        return
     
    458458            result,
    459459            'code,faculty_code,department_code,title,study_mode,'
    460             'degree,start_level,'
     460            'degree,key,start_level,'
    461461            'end_level,application_category,ratio,'
    462462            'school_fee_1,school_fee_2,school_fee_3,school_fee_4,'
     
    464464            'custom_float_1,custom_float_2,'
    465465            'users_with_local_roles\r\n'
    466             'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,'
     466            'CERT1,F1,D1,Master of Cheese,ct_ft,,CERT1,100,300,basic,,,,,,,,,,'
    467467            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    468             'CERT2,F1,D1,Master of Cheddar,ct_ft,,400,700,cest,,,,,,,,,,[]\r\n'
    469             'CERT3,F1,D2,Cert. of Rubbish,dp_pt,,100,200,no,,,,,,,,,,[]\r\n'
     468            'CERT2,F1,D1,Master of Cheddar,ct_ft,,CERT2,400,700,cest,,,,,,,,,,[]\r\n'
     469            'CERT3,F1,D2,Cert. of Rubbish,dp_pt,,CERT3,100,200,no,,,,,,,,,,[]\r\n'
    470470            )
    471471        return
Note: See TracChangeset for help on using the changeset viewer.