Ignore:
Timestamp:
15 Feb 2008, 08:06:37 (17 years ago)
Author:
Henrik Bettermann
Message:

srp_view.pt: Notice for course advisers added

action_after_* in external_study_level_view.pt and study_level_view.pt fixed

change_bed.py: psm modified and fixed for calls without parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py

    r3165 r3169  
    4646        allocated_bed = res[0]
    4747        if allocated_bed.bed_type == status:
    48             logger.info('Status %s of %s has not changed' % (status,student_id))
     48            logger.info('Status %s of %s has not changed.' % (status,student_id))
    4949            psm='Student status has not changed!'
    5050            break
    5151            #return redirect("%s/%s/%s/waeup_document_view?portal_status_message=%s" % (students.absolute_url(),student_id,info['acco_id'],psm))
    52         logger.info('Bed status %s of %s has changed to %s' % (allocated_bed.bed_type,student_id,status))
     52        logger.info('Bed status %s of %s has changed to %s.' % (allocated_bed.bed_type,student_id,status))
    5353        query = Eq('bed_type',status) & Eq('student',context.portal_accommodation.not_occupied)
    5454        records = context.portal_accommodation.evalAdvancedQuery(query)
    5555        if len(records) < 1:
    56             psm='New bed allocation for %s failed, No bed free in category %s' % (student_id,status)
     56            psm='Bed change for %s failed, no free bed in category %s.' % (student_id,status)
    5757            logger.info(psm)
    58             psm='Bed change failed!'
    5958            break
    6059        beds.modifyRecord(bed=allocated_bed.bed,student=beds.not_occupied)
     
    7675        #acco_doc = info['acco_doc']
    7776        #acco_doc.edit(mapping={'bed':"-- cancelled by officer due to failed bed change request --"})
    78         logger.info('New bed allocation for %s failed, code = %s' % (student_id,code))
     77        logger.info('Bed change for %s failed, code = %s' % (student_id,code))
    7978        #logger.info('%s cancelled booking of bed %s by %s' % (member,bed,student_id))
    8079        psm='Bed change failed!'
     
    8281
    8382info = {}
    84 records = [r for r in beds() if  r.student]
     83records = [r for r in beds() if  r.student and  r.student != beds.not_occupied]
    8584list = []
    8685to_modify = []
     
    9190        continue
    9291    elif r.bed_type == sbt:
    93         list.append("Student %s bed_type %s ok" % (r.student,r.bed_type))
     92        #list.append("Student %s bed_type %s ok" % (r.student,r.bed_type))
    9493        continue
    9594    list.append("Student %s bed_type %s != %s" % (r.student,
    9695                                                  r.bed_type,
    9796                                                  info['student_status']))
    98     to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc']))
     97    #to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc']))
     98   
     99return "\r".join(list)
     100   
    99101for former_bed, student, status,acco_doc in to_modify:
    100102    beds.modifyRecord(bed=former_bed,student='')
Note: See TracChangeset for help on using the changeset viewer.