Changeset 2647 for WAeUP_SRP/base


Ignore:
Timestamp:
13 Nov 2007, 21:22:00 (17 years ago)
Author:
Henrik Bettermann
Message:

fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/getStudentLevelsVoc.py

    r2641 r2647  
    33"""
    44Return the levels as an vocabulary
    5 #
    6 try:
    7     from Products.zdb import set_trace
    8 except:
    9     def set_trace():
    10         pass
    115"""
    126student_id = context.getStudentId()
     
    3327    return voc
    3428       
    35 ikey = int(key)
     29try:
     30    ikey = int(key)
     31except ValueError:
     32    return ''
    3633level_nr,repeat = divmod(ikey, 100)
    3734l = []
     
    3936level = context.portal_vocabularies.levels.get("%d00" % level_nr)
    4037if 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))
    4239
    4340if repeat > 0:
    44     level += " (on %d. probation)" % (repeat // 10)
     41    level += " on %d. probation" % (repeat // 10)
    4542
    4643return level
    4744
     45
Note: See TracChangeset for help on using the changeset viewer.