Ignore:
Timestamp:
5 Jul 2007, 11:14:12 (17 years ago)
Author:
joachim
Message:

merged r1979:r1987 from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/branches/joachim-azax-branch/Widgets.py

    r1915 r1988  
    177177
    178178class WAeUPStudyModeWidget(CPSSelectWidget): ###(
    179     """WAeUP StudyMode widget."""
     179    """WAeUP StudyMode Widget."""
    180180    meta_type = 'WAeUP StudyMode Widget'
    181181    vocabulary = 'entry_modes'
     
    246246
    247247class WAeUPSessionWidget(CPSSelectWidget): ###(
    248     """WAeUP Session widget."""
     248    """WAeUP Session Widget."""
    249249    meta_type = 'WAeUP Session Widget'
    250250
    251251    def _getSessions(self):
    252252        current_year = DateTime().year()
    253         d = {'xx': 'unknown'}
     253        d = {'-1': 'N/A'}
    254254        for y in range(current_year - 9,current_year + 1):
    255255            d['%s' % str(y)[-2:]] = '%4d/%4d' % (y,y+1)
     
    295295            vocabulary_items = sessions.items()
    296296            if self.sorted:
    297                 vocabulary_items.sort(key=operator.itemgetter(1))
     297                vocabulary_items.sort(key=operator.itemgetter(0))
    298298            for k, v in vocabulary_items:
    299299                kw = {'value': k, 'contents': v}
     
    321321
    322322    def _getLevels(self):
    323         d = {'999':'unknown'}
     323        d = {'000':'N/A'}
    324324        for y in range(100,800,100):
    325325            d['%s' % str(y)] = 'Year %1d (%3d Level)' % (y/100,y)
     
    363363            vocabulary_items = levels.items()
    364364            if self.sorted:
    365                 vocabulary_items.sort(key=operator.itemgetter(1))
     365                vocabulary_items.sort(key=operator.itemgetter(0))
    366366            for k, v in vocabulary_items:
    367367                kw = {'value': k, 'contents': v}
     
    385385
    386386class WAeUPVerdictWidget(CPSSelectWidget): ###(
    387     """WAeUP Verdict widget."""
     387    """WAeUP Verdict Widget."""
    388388    meta_type = 'WAeUP Verdict Widget'
    389389
Note: See TracChangeset for help on using the changeset viewer.