Ignore:
Timestamp:
8 Jul 2024, 16:05:10 (6 months ago)
Author:
Henrik Bettermann
Message:

Improve NYSCExporter.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py

    r17834 r17835  
    10951095            'nysc_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    10961096        form_fields['nysc'].custom_widget = CustomBooleanRadioWidget
    1097         form_fields['nysc_senate_info'].field.description = u'Sample: Meeting Date: 10TH MAY 2023. DEG CLASS: FIRST CLASS. S/NO: 01'
     1097        form_fields['nysc_processed'].for_display = True
    10981098        #form_fields['nysc_senate_info'].field.description = u''
    10991099        return form_fields
     
    11191119        form_fields['nysc'].field.description = u''
    11201120        form_fields['nysc'].field.title = u'NYSC requested'
    1121         form_fields['nysc_senate_info'].field.description = u'Sample: Meeting Date: 10TH MAY 2023. DEG CLASS: FIRST CLASS. S/NO: 01'
    11221121        form_fields[
    11231122            'nysc_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le')
  • main/waeup.uniben/trunk/src/waeup/uniben/students/export.py

    r17834 r17835  
    210210        'nysc_date_of_graduation',
    211211        'nysc_updated',
     212        'nysc_processed',
    212213        ) + year_range_tuple
    213214    title = u'NYSC Indication'
     
    216217        students = list()
    217218        for student in x:
    218             if student.nysc == True:
     219            if student.nysc == True and student.nysc_processed == False:
    219220                students.append(student)
    220221        return students
  • main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py

    r17822 r17835  
    226226        )
    227227
     228    nysc_processed = schema.Bool(
     229        title = u'NYSC processed',
     230        default = False,
     231        required = True,
     232        )
     233
    228234    nysc_updated = schema.Datetime(
    229235        title = _(u'NYSC request data last updated by student'),
     
    239245        title = _(u'Senate Info'),
    240246        required = False,
     247        description = u'Sample: Meeting Date: 10TH MAY 2023. DEG CLASS: FIRST CLASS. S/NO: 01',
    241248        )
    242249
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_export.py

    r17834 r17835  
    178178        self.setup_student(self.student)
    179179        self.student.nysc = True
     180        self.student.nysc_processed = False
    180181        self.student.lga = u'xyz_abc'
    181182        exporter = NYSCExporter()
     
    187188            'depcode,current_level,current_session,current_verdict,'
    188189            'entry_session,faccode,depcode,certcode,'
    189             'nysc_senate_info,nysc_date_of_graduation,nysc_updated,%s\r\n'
     190            'nysc_senate_info,nysc_date_of_graduation,nysc_updated,nysc_processed,%s\r\n'
    190191            'A111111,234,123,Anna,M.,Tester,f,NG,1981-02-04#,created,xyz,abc,ug_ft,'
    191             'CERT1,NA,NA,200,2012,0,2010,NA,NA,CERT1,,,,,,,,,12.12,,,,,,\r\n' % year_range_str,
     192            'CERT1,NA,NA,200,2012,0,2010,NA,NA,CERT1,,,,0,,,,,,12.12,,,,,,\r\n' % year_range_str,
    192193            result
    193194            )
Note: See TracChangeset for help on using the changeset viewer.