Changeset 7617 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 9 Feb 2012, 08:04:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/vocabularies.py
r7611 r7617 63 63 def getTitle(self, context, value): 64 64 if context.certificate is not None: 65 start_level = int(context.certificate.start_level) 65 66 end_level = int(context.certificate.end_level) 66 67 else: 68 start_level = 10 67 69 end_level = 800 70 if value < start_level or value > end_level + 110: 71 return "Error: level id %s out of range" % value 72 if value == 10: 73 return course_levels.by_value[value].title 68 74 level,repeat = divmod(value, 100) 69 75 level = level * 100 … … 71 77 title = course_levels.by_value[level].title 72 78 if level > end_level and repeat: 73 title = course_levels.by_value[level -100].title74 title ="%s 2nd spillover" % title75 elif level > end_level:76 title = course_levels.by_value[level -100].title77 title ="%s spillover" % title78 elif repeat:79 title ="%s on %d. probation" % (title, repeat)79 title = course_levels.by_value[level - 100].title 80 return "%s 2nd spillover" % title 81 if level > end_level: 82 title = course_levels.by_value[level - 100].title 83 return "%s spillover" % title 84 if repeat: 85 return "%s on %d. probation" % (title, repeat) 80 86 return title 81 87
Note: See TracChangeset for help on using the changeset viewer.