Changeset 1988 for WAeUP_SRP/branches/joachim-azax-branch/Widgets.py
- Timestamp:
- 5 Jul 2007, 11:14:12 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/joachim-azax-branch/Widgets.py
r1915 r1988 177 177 178 178 class WAeUPStudyModeWidget(CPSSelectWidget): ###( 179 """WAeUP StudyMode widget."""179 """WAeUP StudyMode Widget.""" 180 180 meta_type = 'WAeUP StudyMode Widget' 181 181 vocabulary = 'entry_modes' … … 246 246 247 247 class WAeUPSessionWidget(CPSSelectWidget): ###( 248 """WAeUP Session widget."""248 """WAeUP Session Widget.""" 249 249 meta_type = 'WAeUP Session Widget' 250 250 251 251 def _getSessions(self): 252 252 current_year = DateTime().year() 253 d = {' xx': 'unknown'}253 d = {'-1': 'N/A'} 254 254 for y in range(current_year - 9,current_year + 1): 255 255 d['%s' % str(y)[-2:]] = '%4d/%4d' % (y,y+1) … … 295 295 vocabulary_items = sessions.items() 296 296 if self.sorted: 297 vocabulary_items.sort(key=operator.itemgetter( 1))297 vocabulary_items.sort(key=operator.itemgetter(0)) 298 298 for k, v in vocabulary_items: 299 299 kw = {'value': k, 'contents': v} … … 321 321 322 322 def _getLevels(self): 323 d = {' 999':'unknown'}323 d = {'000':'N/A'} 324 324 for y in range(100,800,100): 325 325 d['%s' % str(y)] = 'Year %1d (%3d Level)' % (y/100,y) … … 363 363 vocabulary_items = levels.items() 364 364 if self.sorted: 365 vocabulary_items.sort(key=operator.itemgetter( 1))365 vocabulary_items.sort(key=operator.itemgetter(0)) 366 366 for k, v in vocabulary_items: 367 367 kw = {'value': k, 'contents': v} … … 385 385 386 386 class WAeUPVerdictWidget(CPSSelectWidget): ###( 387 """WAeUP Verdict widget."""387 """WAeUP Verdict Widget.""" 388 388 meta_type = 'WAeUP Verdict Widget' 389 389
Note: See TracChangeset for help on using the changeset viewer.