Changeset 10185 for main


Ignore:
Timestamp:
22 May 2013, 06:45:17 (11 years ago)
Author:
Henrik Bettermann
Message:

Add custom fields to certificates (not used in base package).

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

Legend:

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

    r10166 r10185  
    5858                 school_fee_1=None, school_fee_2=None,
    5959                 school_fee_3=None, school_fee_4=None,
    60                  ratio=None):
     60                 ratio=None,
     61                 custom_textline_1=None, custom_textline_2=None,
     62                 custom_float_1=None, custom_float_2=None):
    6163        super(Certificate, self).__init__()
    6264        self.code = code
     
    7173        self.school_fee_4 = school_fee_4
    7274        self.ratio = ratio
     75        self.custom_textline_1 = custom_textline_1
     76        self.custom_textline_2 = custom_textline_2
     77        self.custom_float_1 = custom_float_1
     78        self.custom_float_2 = custom_float_2
    7379
    7480    def traverse(self, name):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/export.py

    r10172 r10185  
    158158              'start_level', 'end_level', 'application_category', 'ratio',
    159159              'school_fee_1', 'school_fee_2', 'school_fee_3', 'school_fee_4',
     160              'custom_textline_1', 'custom_textline_2',
     161              'custom_float_1', 'custom_float_2',
    160162              'users_with_local_roles')
    161163
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r10166 r10185  
    266266        )
    267267
     268    custom_textline_1 = schema.TextLine(
     269        title = _(u'Custom Textline 1 (not used)'),
     270        required = False,
     271        )
     272
     273    custom_textline_2 = schema.TextLine(
     274        title = _(u'Custom Textline 2 (not used)'),
     275        required = False,
     276        )
     277
     278    custom_float_1 = schema.Float(
     279        title = _(u'Custom Float 1 (not used)'),
     280        required = False,
     281        )
     282
     283    custom_float_2 = schema.Float(
     284        title = _(u'Custom Float 2 (not used)'),
     285        required = False,
     286        )
     287
    268288    def longtitle():
    269289        """
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py

    r10172 r10185  
    380380            'code,faculty_code,department_code,title,study_mode,start_level,'
    381381            'end_level,application_category,ratio,school_fee_1,'
    382             'school_fee_2,school_fee_3,school_fee_4,users_with_local_roles\r\n'
    383             'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,'
     382            'school_fee_2,school_fee_3,school_fee_4,'
     383            'custom_textline_1,custom_textline_2,'
     384            'custom_float_1,custom_float_2,'
     385            'users_with_local_roles\r\n'
     386            'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,,,,,'
    384387            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    385388            )
     
    394397            'code,faculty_code,department_code,title,study_mode,start_level,'
    395398            'end_level,application_category,ratio,school_fee_1,'
    396             'school_fee_2,school_fee_3,school_fee_4,users_with_local_roles\r\n'
    397             'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,'
    398             '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    399             'CERT2,F1,D1,Master of Cheddar,ct_ft,400,700,cest,,,,,,[]\r\n'
     399            'school_fee_2,school_fee_3,school_fee_4,'
     400            'custom_textline_1,custom_textline_2,'
     401            'custom_float_1,custom_float_2,'
     402            'users_with_local_roles\r\n'
     403            'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,,,,,'
     404            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
     405            'CERT2,F1,D1,Master of Cheddar,ct_ft,400,700,cest,,,,,,,,,,[]\r\n'
    400406            )
    401407        return
     
    411417            'end_level,application_category,ratio,'
    412418            'school_fee_1,school_fee_2,school_fee_3,school_fee_4,'
     419            'custom_textline_1,custom_textline_2,'
     420            'custom_float_1,custom_float_2,'
    413421            'users_with_local_roles\r\n'
    414             'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,'
    415             '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    416             'CERT2,F1,D1,Master of Cheddar,ct_ft,400,700,cest,,,,,,[]\r\n'
    417             'CERT3,F1,D2,Cert. of Rubbish,dp_pt,100,200,no,,,,,,[]\r\n'
     422            'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,,,,,'
     423            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
     424            'CERT2,F1,D1,Master of Cheddar,ct_ft,400,700,cest,,,,,,,,,,[]\r\n'
     425            'CERT3,F1,D2,Cert. of Rubbish,dp_pt,100,200,no,,,,,,,,,,[]\r\n'
    418426            )
    419427        return
     
    428436            'end_level,application_category,ratio,'
    429437            'school_fee_1,school_fee_2,school_fee_3,school_fee_4,'
     438            'custom_textline_1,custom_textline_2,'
     439            'custom_float_1,custom_float_2,'
    430440            'users_with_local_roles\r\n'
    431             'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,'
    432             '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    433             'CERT2,F1,D1,Master of Cheddar,ct_ft,400,700,cest,,,,,,[]\r\n'
    434             'CERT3,F1,D2,Cert. of Rubbish,dp_pt,100,200,no,,,,,,[]\r\n'
     441            'CERT1,F1,D1,Master of Cheese,ct_ft,100,300,basic,,,,,,,,,,'
     442            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
     443            'CERT2,F1,D1,Master of Cheddar,ct_ft,400,700,cest,,,,,,,,,,[]\r\n'
     444            'CERT3,F1,D2,Cert. of Rubbish,dp_pt,100,200,no,,,,,,,,,,[]\r\n'
    435445            )
    436446        return
Note: See TracChangeset for help on using the changeset viewer.