Last change
on this file since 1508 was
1453,
checked in by Henrik Bettermann, 18 years ago
|
|
-
Property svn:keywords set to
Id
|
File size:
640 bytes
|
Rev | Line | |
---|
[821] | 1 | ## Script (Python) "students_indext" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
[667] | 7 | ##parameters=bed=None,mode=None,datastructure=None |
---|
[821] | 8 | ##title= |
---|
[805] | 9 | # $Id: formatBed.py 1453 2007-02-20 22:24:30Z henrik $ |
---|
[642] | 10 | """ |
---|
| 11 | format the bed for readability |
---|
| 12 | """ |
---|
| 13 | |
---|
[667] | 14 | if datastructure is not None: |
---|
| 15 | bed = datastructure.get('bed') |
---|
[686] | 16 | if not bed: |
---|
| 17 | return '' |
---|
[1453] | 18 | if len(bed.split('_')) != 4: |
---|
| 19 | return bed |
---|
[642] | 20 | hall,block,room,letter = bed.split('_') |
---|
[828] | 21 | info = context.waeup_tool.getAccommodationInfo(bed) |
---|
| 22 | if info: |
---|
| 23 | hall_title = info['hall_title'] |
---|
| 24 | else: |
---|
| 25 | hall_title = "" |
---|
[669] | 26 | return " %s / Block %s / Room %s / Bed %s" % (hall_title,block,room,letter) |
---|
[1453] | 27 | |
---|
Note: See
TracBrowser for help on using the repository browser.