Changeset 9761 for main/waeup.kofa/trunk


Ignore:
Timestamp:
3 Dec 2012, 06:34:58 (12 years ago)
Author:
Henrik Bettermann
Message:

Show entry_sesssion in export. Show only level_session to ease post-processing with Excel.

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

Legend:

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

    r9744 r9761  
    405405    fields = ('student_id', ) + (
    406406        'state', 'certcode', 'faccode', 'depcode', 'is_postgrad',
    407         'current_level', 'current_session',
     407        'entry_session', 'current_level', 'current_session',
    408408        ) + level_range_tuple
    409409
     
    416416            for level in context['studycourse'].values():
    417417                if level.level == int(name):
    418                     value = '%s|%s|%s|%s' % (
    419                         level.level_session,
    420                         len(level),
    421                         level.validated_by,
    422                         level.level_verdict)
     418                    #value = '%s|%s|%s|%s' % (
     419                    #    level.level_session,
     420                    #    len(level),
     421                    #    level.validated_by,
     422                    #    level.level_verdict)
     423                    value = '%s' % level.level_session
    423424                    break
    424425        return super(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r9734 r9761  
    155155    depcode = Attribute('The department code of any chosen study course')
    156156    faccode = Attribute('The faculty code of any chosen study course')
     157    entry_session = Attribute('The entry session of the student')
    157158    current_session = Attribute('The current session of the student')
    158159    current_level = Attribute('The current level of the student')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/student.py

    r9569 r9761  
    167167
    168168    @property
     169    def entry_session(self):
     170        session = getattr(
     171            self.get('studycourse', None), 'entry_session', None)
     172        return session
     173
     174    @property
    169175    def current_level(self):
    170176        level = getattr(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r9744 r9761  
    672672        self.assertEqual(
    673673             'student_id,state,certcode,faccode,depcode,is_postgrad,'
    674              'current_level,current_session,'
     674             'entry_session,current_level,current_session,'
    675675             '10,100,110,120,200,210,220,300,310,320,400,410,420,500,'
    676676             '510,520,600,610,620,700,710,720,800,810,820,900,910,920,999\r\n'
    677              'A111111,created,CERT1,NA,NA,0,200,2012,,2012|1|None|A'
     677             'A111111,created,CERT1,NA,NA,0,2010,200,2012,,2012'
    678678             ',,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n',
    679679            result
     
    688688        self.assertEqual(
    689689            'student_id,state,certcode,faccode,depcode,is_postgrad,'
    690             'current_level,current_session,'
     690            'entry_session,current_level,current_session,'
    691691            '10,100,110,120,200,210,220,300,310,320,400,410,420,500,'
    692692            '510,520,600,610,620,700,710,720,800,810,820,900,910,920,999\r\n'
    693             'A111111,created,CERT1,NA,NA,0,200,2012,,2012|1|None|A'
     693            'A111111,created,CERT1,NA,NA,0,2010,200,2012,,2012'
    694694            ',,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n',
    695695            result
Note: See TracChangeset for help on using the changeset viewer.