Changeset 1446


Ignore:
Timestamp:
19 Feb 2007, 22:14:47 (18 years ago)
Author:
Henrik Bettermann
Message:

make book_reserved_bed work

Location:
WAeUP_SRP/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/vocabularies/verdicts.xml

    r1434 r1446  
    88 <item key="A" msgid="">successful student</item>
    99 <item key="B" msgid="">student with carryover courses</item>
    10  <item key="C" msgid="">student for probation</item>
     10 <item key="C" msgid="">student on probation</item>
    1111 <item key="C" msgid="">student on probation/transfer</item>
    1212 <item key="D" msgid="">student who is to withdraw from the faculty</item>
  • WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py

    r1444 r1446  
    7272            break
    7373        if not bed_brain.bed_type.endswith("reserved"):
    74             psm = "Not a reserved bed %s" % bid
     74            psm = "Not a reserved bed: %s" % bid
    7575            break
    7676        if bed_brain.student and not change:
     
    8585            break
    8686        if not bed_brain.bed_type.endswith("reserved"):
    87             psm = "Not a reserved bed %s" % bid
     87            psm = "Not a reserved bed: %s" % bid
    8888            break
    8989        if not bed_brain.student:
     
    9191            break
    9292    break
    93        
     93
    9494if psm != '':
    9595    return context.book_reserved_bed_form(rendered = rendered,
     
    103103    for bed in already:
    104104        acco_cat.modifyRecord(bed=bed.bed,student='')
    105        
     105
    106106students = context.portal_url.getPortalObject().campus.students
    107107student_obj = getattr(students,sid)
     
    118118    if acco_id in student_obj.objectIds():
    119119        acco_doc = getattr(student_obj, acco_id).getContent()
    120         acco_doc.edit(mapping={'bed': bid + "(removed)"})
    121     logger.info('"%s","released reserved bed %s for","%s"' % (member,bid,sid))
    122     psm = "Bed %s released for %s" % (sid,student.name)
    123    
     120        acco_doc.edit(mapping={'bed':bid + " (reservation cancelled by %s!)" % member})
     121    logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
     122    psm = "%s removed from %s" % (student.name,bid)
     123
    124124mode = 'view'
    125125return context.book_reserved_bed_form(rendered = "",
  • WAeUP_SRP/trunk/skins/waeup_accommodation/reservedRoomsVoc.py

    r1393 r1446  
    1 ##parameters=key=None 
     1##parameters=key=None
    22# $Id$
    33"""
     
    66"""
    77doc = context.getContent()
    8 voc = [("_".join((r.split('/')[0],r.split('/')[1])),r) 
    9                       for r in doc.reserved_rooms.split(',') if r]
     8voc = [("_".join((r.split('/')[0],r.split('/')[1])),r)
     9                      for r in doc.reserved_rooms.replace(' ','').split(',') if r]
    1010#from Products.zdb import set_trace;set_trace()
    1111if not key:
  • WAeUP_SRP/trunk/skins/waeup_student/getVerdict.py

    r1401 r1446  
    1010# $Id$
    1111
    12 verdicts = {'SUCCESSFUL STUDENT': ('successful',True),
    13             'STUDENT WITH CARRYOVER COURSES': ('carryover',True),
    14             'STUDENT ON PROBATION': ('probation',False),
    15             'WITHDRAWAL STUDENT': ('withdrawal',False),
     12verdicts = {'SUCCESSFUL STUDENT': ('A',True),
     13            'STUDENT WITH CARRYOVER COURSES': ('B',True),
     14            'STUDENT ON PROBATION': ('C',False),
     15            'WITHDRAWAL STUDENT': ('D',False),
    1616            'FIRST CLASS HONOURS': ('first_class',False),
    1717            'SECOND CLASS HONOURS (UPPER DIVISION)': ('second_class_upper',False),
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r1278 r1446  
    228228    for item in items:
    229229        stcat = context.students_catalog
    230         record = stcat(id = item)[0]
     230        record = stcat(id = item)
     231        if record:
     232            record = record[0]
     233        else:
     234            return item+' not found in students_catalog'
    231235        info = {}
    232236        for field in stcat.schema() + stcat.indexes():
Note: See TracChangeset for help on using the changeset viewer.