Last change
on this file since 1764 was
1758,
checked in by joachim, 18 years ago
|
previous sessions students can now pay their previous sessions schoolfees,
please test if "normal" returning students can still pay.
|
-
Property svn:keywords set to
Id
|
File size:
362 bytes
|
Rev | Line | |
---|
[1736] | 1 | ##parameters=key=None |
---|
[1728] | 2 | # $Id: sessions_voc.py 1758 2007-05-08 20:43:37Z joachim $ |
---|
| 3 | """ |
---|
| 4 | Return the sessions as an vocabulary |
---|
| 5 | |
---|
| 6 | """ |
---|
| 7 | if key is None: |
---|
[1747] | 8 | l = [('xx','unknown')] |
---|
[1728] | 9 | for y in range(1998,2008): |
---|
| 10 | l.append( ('%s' % str(y)[-2:],'%4d/%4d' % (y,y+1))) |
---|
| 11 | return l |
---|
| 12 | |
---|
| 13 | try: |
---|
| 14 | y = int(key) |
---|
| 15 | except: |
---|
[1747] | 16 | return 'unknown' |
---|
[1728] | 17 | if y < 90: |
---|
| 18 | cent = 2000 |
---|
| 19 | else: |
---|
| 20 | cent = 1900 |
---|
| 21 | return "%4d/%4d" % (cent+y, cent+y+1) |
---|
| 22 | |
---|
Note: See
TracBrowser for help on using the repository browser.