Ignore:
Timestamp:
19 Mar 2007, 18:57:54 (18 years ago)
Author:
uli
Message:

Merged current trunk into uli-branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/branches/uli/skins/waeup_accommodation/allocate_reserved_bed.py

    r1477 r1593  
    1313acco_cat = context.portal_accommodation
    1414import logging
    15 logger = logging.getLogger('Accommodation.AllocateReservedBed')
     15logger = logging.getLogger('Skins.allocate_reserved_bed')
    1616
    1717#change = REQUEST.has_key("allocate_and_change")
     
    7373    if allocate or change:
    7474        if already and not change:
    75             psm = "Student %s already reserved bed %s" % (sid, already[0].bed)
     75            psm = "Student %s has already reserved bed %s" % (sid, already[0].bed)
    7676            break
    7777        if not bed_brain.bed_type.endswith("reserved"):
    78             psm = "Not a reserved bed: %s" % bid
     78            psm = "%s is not a reserved bed" % bid
    7979            break
    8080        if bed_brain.student and not change:
     
    8888            acco_doc = getattr(student_obj, acco_id).getContent()
    8989            if acco_doc.bed == bid:
    90                 psm = "Student %s has already booked (paid) bed %s" % (sid, bid)
     90                psm = "Student %s has already booked (and paid) bed %s" % (sid, bid)
    9191                break
    9292        if not already:
     
    9494            break
    9595        if not bed_brain.bed_type.endswith("reserved"):
    96             psm = "Not a reserved bed: %s" % bid
     96            psm = "%s is not a reserved bed" % bid
    9797            break
    9898        if not bed_brain.student:
     
    118118        acco_doc = getattr(student_obj, acco_id).getContent()
    119119        acco_doc.edit(mapping={'bed': bid})
    120     logger.info('"%s","booked reserved bed %s for","%s"' % (member,bid,sid))
     120    logger.info('%s booked reserved bed %s for %s' % (member,bid,sid))
    121121    psm = "Bed %s reserved for %s %s" % (bid,sid,student.name)
    122122elif release:
     
    130130    if modify:
    131131        acco_cat.modifyRecord(bed=bid,student='')
    132         logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
     132        logger.info('%s released bed %s booked by %s' % (member,bid,sid))
    133133        psm = "%s removed from %s" % (student.name,bid)
    134134    else:
    135         psm = "%s removing failed from %s" % (student.name,bid)
     135        psm = "Removing of %s from bed %s failed" % (student.name,bid)
    136136
    137137mode = 'view'
Note: See TracChangeset for help on using the changeset viewer.