Changeset 2647
- Timestamp:
- 13 Nov 2007, 21:22:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/getStudentLevelsVoc.py
r2641 r2647 3 3 """ 4 4 Return the levels as an vocabulary 5 #6 try:7 from Products.zdb import set_trace8 except:9 def set_trace():10 pass11 5 """ 12 6 student_id = context.getStudentId() … … 33 27 return voc 34 28 35 ikey = int(key) 29 try: 30 ikey = int(key) 31 except ValueError: 32 return '' 36 33 level_nr,repeat = divmod(ikey, 100) 37 34 l = [] … … 39 36 level = context.portal_vocabularies.levels.get("%d00" % level_nr) 40 37 if level_nr > end_level/100: 41 return "%s (spillover)" % context.portal_vocabularies.levels.get("%d00" % (level_nr - 1))38 return "%s spillover" % context.portal_vocabularies.levels.get("%d00" % (level_nr - 1)) 42 39 43 40 if repeat > 0: 44 level += " (on %d. probation)" % (repeat // 10)41 level += " on %d. probation" % (repeat // 10) 45 42 46 43 return level 47 44 45
Note: See TracChangeset for help on using the changeset viewer.