Last change
on this file since 821 was
821,
checked in by joachim, 18 years ago
|
make hostel allocation work
|
-
Property svn:keywords set to
Id
|
File size:
609 bytes
|
Line | |
---|
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 |
---|
7 | ##parameters=bed=None,mode=None,datastructure=None |
---|
8 | ##title= |
---|
9 | # $Id: formatBed.py 821 2006-11-09 21:37:29Z joachim $ |
---|
10 | """ |
---|
11 | format the bed for readability |
---|
12 | """ |
---|
13 | |
---|
14 | if datastructure is not None: |
---|
15 | bed = datastructure.get('bed') |
---|
16 | if not bed: |
---|
17 | return '' |
---|
18 | hall,block,room,letter = bed.split('_') |
---|
19 | hall_title = context.restrictedTraverse("%s/campus/getHallTitle" % |
---|
20 | (context.portal_url.getPortalPath()))(hall) |
---|
21 | return " %s / Block %s / Room %s / Bed %s" % (hall_title,block,room,letter) |
---|
Note: See
TracBrowser for help on using the repository browser.