source: WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py @ 1388

Last change on this file since 1388 was 828, checked in by joachim, 18 years ago

reenabled waeup_tool,
reserve accommodation fixed

  • Property svn:keywords set to Id
File size: 595 bytes
RevLine 
[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 828 2006-11-10 15:26:31Z joachim $
[642]10"""
11format the bed for readability
12"""
13
[667]14if datastructure is not None:
15    bed = datastructure.get('bed')
[686]16if not bed:
17    return ''
[642]18hall,block,room,letter = bed.split('_')
[828]19info = context.waeup_tool.getAccommodationInfo(bed)
20if info:
21    hall_title = info['hall_title']
22else:
23    hall_title = ""
[669]24return " %s / Block %s / Room %s / Bed %s" % (hall_title,block,room,letter)
Note: See TracBrowser for help on using the repository browser.