Ignore:
Timestamp:
8 Apr 2008, 15:51:10 (17 years ago)
Author:
Henrik Bettermann
Message:

getAccommodationInfo.py: adjust to Okene version

WAeUPImport.py: remove redundant line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py

    r3425 r3431  
    4040    return None
    4141
     42info['error'] = None
     43info['matric_no']=student_record.matric_no
     44info['jamb_reg_no']=student_record.jamb_reg_no
     45info['name']=student_record.name
     46info['email']=student_record.email
     47info['level']=student_record.level
     48info['verdict']=getattr(student_record,'verdict','')
     49review_state = info['review_state'] = student_record.review_state
     50info['session'] = session = context.getSessionId()
     51students_object = context.portal_url.getPortalObject().campus.students
     52student = getattr(students_object, student_id)
     53info['student_id'] = student_id
     54info['student'] = student
     55
     56booking_allowed = False
     57
     58# customize from here
     59
    4260ekehuan_certificates = ('BARTAPG',
    4361                        'BARTAPM',
     
    5068                        'BARTTHR',
    5169                        )
    52 #pti_certificates = ('BENGIEP',
    53 #                    'BENGGCPP',
    54 #                    'BENGEEP',
    55 #                    'BENGGEP',
    56 #                    'BENGPEP',
    57 #                    'BENGMEP',
    58 #                    )
    59 
    6070
    6171new_states = ('cleared_and_validated',
     
    6575              )
    6676
    67 info['error'] = None
    68 info['matric_no']=student_record.matric_no
    69 info['jamb_reg_no']=student_record.jamb_reg_no
    70 info['name']=student_record.name
    71 info['email']=student_record.email
    72 info['level']=student_record.level
    73 info['verdict']=getattr(student_record,'verdict','')
    74 review_state = info['review_state'] = student_record.review_state
    75 
    76 info['session'] = session = context.getSessionId()
    77 
    78 students_object = context.portal_url.getPortalObject().campus.students
    79 student = getattr(students_object, student_id)
    80 info['student_id'] = student_id
    81 info['student'] = student
    82 
    83 booking_allowed = False
    84 
    8577new = student_record.entry_session == session[0]
    8678arrived = student_record.session == session[0]
     
    8880level = None
    8981end_level = None
     82previous = None
     83
    9084try:
    9185    level = int(student_record.level)
     
    9791    logger.info('%s has invalid end_level %s' % (student_id,student_record.end_level))
    9892try:
    99     previous = int(student_record.session) == int(session[0]) - 1   
     93    previous = int(student_record.session) == int(session[0]) - 1
    10094except:
    10195    logger.info('%s has invalid session %s' % (student_id,student_record.session))
     
    128122    info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"
    129123
    130 
    131124d = {}
    132125delta = 0
     
    139132else:
    140133    bt = 'fi'
    141 # else:
    142 #     res = context.portal_catalog(portal_type = "Certificate", id = student_record.course)
    143 #     if res:
    144 #         c_brain = res[0]
    145 #         #from Products.zdb import set_trace; set_trace()
    146 #         certificate = c_brain.getObject().getContent()
    147 #         try:
    148 #             certlevel = int(certificate.end_level)
    149 #         except:
    150 #             info["error"] = '"no end_level for","%s"' % c_brain.getId
    151 #             return info
    152 #         try:
    153 #             studentlevel = int(student_record.level)
    154 #         except:
    155 #             info["error"] = '"no level for","%s"' % student_record.getId
    156 #             return info
    157 #         if studentlevel >= certlevel:
    158 #             bt = "fi"
     134
    159135d['sex'] = 'male'
    160136if student_record.sex:
Note: See TracChangeset for help on using the changeset viewer.