Changeset 8820


Ignore:
Timestamp:
27 Jun 2012, 07:15:21 (12 years ago)
Author:
Henrik Bettermann
Message:

Change key for 'not yet' verdict and sort verdicts.

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

Legend:

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

    r8779 r8820  
    4242    def getValues(self, context):
    4343        verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT
    44         return verdicts_dict.keys()
     44        return sorted(verdicts_dict.keys())
    4545
    4646    def getToken(self, context, value):
     
    4949    def getTitle(self, context, value):
    5050        verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT
     51        if value != '0':
     52            return verdicts_dict[value] + ' (%s)' % value
    5153        return verdicts_dict[value]
    5254
     
    345347        title = _(u'Current Verdict'),
    346348        source = VerdictSource(),
    347         default = 'NY',
     349        default = '0',
    348350        required = False,
    349351        )
     
    352354        title = _(u'Previous Verdict'),
    353355        source = VerdictSource(),
    354         default = 'NY',
     356        default = '0',
    355357        required = False,
    356358        )
     
    396398        title = _(u'Verdict'),
    397399        source = VerdictSource(),
    398         default = 'NY',
     400        default = '0',
    399401        required = False,
    400402        )
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r8779 r8820  
    754754        self.assertEqual(student['studycourse'].current_session, 2005) # +1
    755755        self.assertEqual(student['studycourse'].current_level, 200) # +100
    756         self.assertEqual(student['studycourse'].current_verdict, 'NY') # NY = not set
     756        self.assertEqual(student['studycourse'].current_verdict, '0') # 0 = Zero = not set
    757757        self.assertEqual(student['studycourse'].previous_verdict, 'A')
    758758        self.browser.getControl(name="transition").value = ['register_courses']
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r8621 r8820  
    127127            'entry_mode,entry_session,previous_verdict,student_id\r\n'
    128128
    129             ',,,NY,,,NY,\r\n'
     129            ',,,0,,,0,\r\n'
    130130            )
    131131        return
     
    144144            'entry_mode,entry_session,previous_verdict,student_id\r\n'
    145145
    146             'CERT1,200,2012,NY,ug_ft,2010,NY,A111111\r\n'
     146            'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n'
    147147            )
    148148        return
     
    160160            'entry_mode,entry_session,previous_verdict,student_id\r\n'
    161161
    162             'CERT1,200,2012,NY,ug_ft,2010,NY,A111111\r\n'
     162            'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n'
    163163            )
    164164        return
     
    175175            'entry_mode,entry_session,previous_verdict,student_id\r\n'
    176176
    177             'CERT1,200,2012,NY,ug_ft,2010,NY,A111111\r\n'
     177            'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n'
    178178            )
    179179        return
     
    210210            result,
    211211            'level,level_session,level_verdict,student_id\r\n'
    212             ',,NY,\r\n'
     212            ',,0,\r\n'
    213213            )
    214214        return
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r8708 r8820  
    250250        student['studycourse'].current_session = new_session
    251251        verdict = student['studycourse'].current_verdict
    252         student['studycourse'].current_verdict = 'NY'
     252        student['studycourse'].current_verdict = '0'
    253253        student['studycourse'].previous_verdict = verdict
    254254        return
     
    412412
    413413    VERDICTS_DICT = {
    414         'NY': _('(not yet)'),
     414        '0': _('(not yet)'),
    415415        'A': 'Successful student',
    416416        'B': 'Student with carryover courses',
Note: See TracChangeset for help on using the changeset viewer.