Ignore:
Timestamp:
6 Dec 2007, 15:34:38 (17 years ago)
Author:
joachim
Message:

adopt changes from Uniben

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/fceokene/waeup_custom/getPaymentsFolderInfo.py

    r2834 r2871  
    3636import DateTime
    3737request = context.REQUEST
    38 students = context.portal_url.getPortalObject().campus.students
     38#students = context.portal_url.getPortalObject().campus.students
    3939student_id = context.getStudentId()
    4040if student_id is None:
    4141    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    42 student = getattr(students,student_id)
    43 s_brain = context.students_catalog(id = student_id)[0]
    44 
     42#student = getattr(students,student_id)
     43student_record = context.students_catalog.getRecordByKey(student_id)
     44context['updatePayments']()
    4545payments = []
    46 #from Products.zdb import set_trace;set_trace()
    4746
    4847info = {}
    4948is_so = info['is_so'] = context.isSectionOfficer()
    5049is_student = info['is_student'] = context.isStudent()
    51 info['student_name'] = s_brain.name
     50info['student_name'] = student_record.name
    5251info['query_url'] = "https://webpay.interswitchng.com/paydirect/services/TransactionQueryURL.aspx"
    53 review_state = info['review_state'] = s_brain.review_state
    54 parttime = s_brain.mode and s_brain.mode.endswith('_pt')
    55 fulltime = s_brain.mode and s_brain.mode.endswith('_ft')
     52review_state = info['review_state'] = student_record.review_state
     53parttime = student_record.mode and student_record.mode.endswith('_pt')
     54fulltime = student_record.mode and student_record.mode.endswith('_ft')
    5655
    5756#if review_state == 'cleared_and_validated' or (parttime and review_state == 'returning'):
     
    6059#    sc_payment = True
    6160
    62 session = s_brain.session
    63 next_info = context.getNextInfo(s_brain)
     61session = student_record.session
     62next_info = context.getNextInfo(student_record)
    6463info['next_session'] = next_info['next_session_id']
    6564info['next_session_str'] = next_info['next_session_str']
     
    7372info['prod_id'] = '83'
    7473
    75 info['student_name'] = s_brain.name
     74info['student_name'] = student_record.name
    7675payments_path = "%s/campus/students/%s/payments" % (context.portal_url.getPortalPath(),student_id)
    7776sos = context.portal_catalog(container_path=payments_path)
Note: See TracChangeset for help on using the changeset viewer.