Changeset 1117 for WAeUP_SRP/trunk


Ignore:
Timestamp:
21 Dec 2006, 16:19:39 (18 years ago)
Author:
joachim
Message:

reserve accommodation now respects special cases, change_bed moves wrong assigned students to the right bed.

Location:
WAeUP_SRP/trunk/skins
Files:
2 edited

Legend:

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

    r1104 r1117  
    3838                                                  r.bed_type,
    3939                                                  info['student_status']))
    40     to_modify.append((r.bed,r.student,info['student_status']))
    41    
    42 for former_bed, student, status in to_modify:
     40    to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc']))
     41for former_bed, student, status,acco_doc in to_modify:
    4342    beds.modifyRecord(bed=former_bed,student='')
    4443    code,bed = beds.searchAndReserveBed(student,status)
    4544    if code > 0:
     45        #from Products.zdb import set_trace; set_trace()
    4646        d = {}
    4747        d['bed'] = bed
     
    5050        d['acco_maint_code'] = acco_info.get('maintenance_code')
    5151        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
    52         info['acco_doc'].edit(mapping=d)
    53         list.append("Student %s new bed %s assigned code = %s" % (r.student,
     52        acco_doc.edit(mapping=d)
     53        list.append("Student %s new bed %s assigned code = %s" % (student,
    5454                                                              bed,
    5555                                                              code))
  • WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py

    r1100 r1117  
    5050                        'BARTTHR',
    5151                        )
    52 
     52pti_certificates = ('BENGIEP',
     53                    'BENGGCPP',
     54                    'BENGEEP',
     55                    'BENGGEP',
     56                    'BENGPEP',
     57                    'BENGMEP',
     58                    )
    5359s_brain = res[0]
    5460students_object = context.portal_url.getPortalObject().campus.students
     
    7177if s_brain.course in ekehuan_certificates:
    7278    bt += "_ekenhuan"
     79elif s_brain.course in pti_certificates:
     80    bt += "_pti"
     81   
    7382d['bt'] = bt
    7483#from Products.zdb import set_trace
Note: See TracChangeset for help on using the changeset viewer.