Changeset 1100 for WAeUP_SRP


Ignore:
Timestamp:
20 Dec 2006, 09:23:40 (18 years ago)
Author:
joachim
Message:

reserve accommodation respects ekenhuan campus

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py

    r952 r1100  
    22# $Id$
    33"""
    4 process the Application Form
    5 return html renderer + psm
     4process the the accommodation reservation
    65"""
    76import DateTime
    8 
    97current = DateTime.DateTime()
    108pr = context.portal_registration
    119wftool = context.portal_workflow
    12 
    13 info = context.getStudentInfo()
    14 validate = REQUEST.has_key("cpsdocument_create_button")
    15 #           REQUEST.has_key("cpsdocument_edit_button")
    16 
    1710lt = context.portal_layouts
    18 pr = context.portal_registration
    19 session = current.year()
    20 acco_id = 'accommodation_%s' % session
    21 info = context.getStudentInfo()
     11info = context.getAccommodationInfo()
    2212student = info['student']
     13acco_id = info['acco_id']
     14session = acco_id[-4:]
    2315mode = 'create'
    24 
    2516if info['review_state'] != 'cleared_and_validated':
    2617    return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())
    27 
     18validate = REQUEST.has_key("cpsdocument_create_button")
    2819if info.has_key('acco') and info['acco']:
    2920    validate = REQUEST.has_key("cpsdocument_edit_button")
     
    6960        pin = str(ds.get('acco_res_sc_pin'))
    7061        pa = context.portal_accommodation
    71         code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
     62        code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status']))
     63        #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
    7264        if code < 0:
    7365            return context.accommodation_pin_edit_form(rendered = res,
     
    8476        ds.set('bed', bed)
    8577        ds.set('session', session)
     78        ds.set('student_status',info['student_status'])
    8679        acco.getContent().edit(mapping=ds)
    8780        #wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
Note: See TracChangeset for help on using the changeset viewer.