source: WAeUP_SRP/base/skins/waeup_accommodation/reservedRoomsVoc.py @ 2923

Last change on this file since 2923 was 1447, checked in by joachim, 18 years ago

new function fixReservedBeds:
walks through all reserved beds
if the bed is allocated to a student:

if the student has an accommodation object:

if not the same as the reserved bed:

deallocate bed.


  • Property svn:keywords set to Id
File size: 399 bytes
Line 
1##parameters=key=None,doc=None
2# $Id: reservedRoomsVoc.py 1447 2007-02-20 13:41:26Z joachim $
3"""
4Return the reservedrooms as an vocabulary
5
6"""
7if doc is None:
8    doc = context.getContent()
9voc = [("_".join((r.split('/')[0].strip(),r.split('/')[1].strip())),r)
10                      for r in doc.reserved_rooms.split(',') if r]
11#from Products.zdb import set_trace;set_trace()
12if not key:
13    return voc
14for k,v in voc:
15    if k == key:
16        return v
Note: See TracBrowser for help on using the repository browser.