Ignore:
Timestamp:
20 Jul 2023, 13:38:29 (19 months ago)
Author:
Henrik Bettermann
Message:

Remove redundant ‚key‘ field from exports.
Adjust tests and code.
Add columns to transcript officers landing page.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/university
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/university/export.py

    r16450 r17497  
    123123
    124124    def mangle_value(self, value, name, context=None):
    125         """The mangler additionally computes the department_code value
    126         which is the code of the department that offers the course.
     125        """The mangler additionally computes the department_code
     126        and faculty_code values.
    127127        """
    128128        if name == 'users_with_local_roles':
     
    166166
    167167    fields = ('code', 'faculty_code', 'department_code', 'title', 'study_mode',
    168               'degree','key',
     168              'degree',
    169169              'start_level', 'end_level', 'application_category', 'ratio',
    170170              'school_fee_1', 'school_fee_2', 'school_fee_3', 'school_fee_4',
     
    174174
    175175    title = _(u'Certificates')
    176 
    177     def mangle_value(self, value, name, context=None):
    178         """The mangler additionally computes the department_code value
    179         which is the code of the department that offers the certificate.
    180         """
    181         if name == 'key':
    182             value = context.__name__
    183         return super(CertificateExporter, self).mangle_value(
    184             value, name, context)
    185176
    186177    def export_all(self, site, filepath=None):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py

    r16450 r17497  
    400400            result,
    401401            'code,faculty_code,department_code,title,study_mode,'
    402             'degree,key,start_level,'
     402            'degree,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,,CERT1,100,300,basic,,,,,,,,,,'
     408            'CERT1,F1,D1,Master of Cheese,ct_ft,,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,key,start_level,'
     420            'degree,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,,CERT1,100,300,basic,,,,,,,,,,'
     426            'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,'
    427427            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    428             'CERT2,F1,D1,Master of Cheddar,ct_ft,,CERT2,400,700,cest,,,,,,,,,,[]\r\n'
     428            'CERT2,F1,D1,Master of Cheddar,ct_ft,,400,700,cest,,,,,,,,,,[]\r\n'
    429429            )
    430430        return
     
    438438            result,
    439439            'code,faculty_code,department_code,title,study_mode,'
    440             'degree,key,start_level,'
     440            'degree,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,,CERT1,100,300,basic,,,,,,,,,,'
     446            'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,'
    447447            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\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'
     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'
    450450            )
    451451        return
     
    458458            result,
    459459            'code,faculty_code,department_code,title,study_mode,'
    460             'degree,key,start_level,'
     460            'degree,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,,CERT1,100,300,basic,,,,,,,,,,'
     466            'CERT1,F1,D1,Master of Cheese,ct_ft,,100,300,basic,,,,,,,,,,'
    467467            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\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'
     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'
    470470            )
    471471        return
Note: See TracChangeset for help on using the changeset viewer.