Ignore:
Timestamp:
28 Oct 2007, 13:56:01 (17 years ago)
Author:
Henrik Bettermann
Message:

show payment button only if verdict, session and level are not empty
pay_by_sc.py: open study_course to fill new level and session after payment

Location:
WAeUP_SRP/base/skins/waeup_epayment
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py

    r2454 r2459  
    6262#    sc_payment = True
    6363
    64 if review_state == 'cleared_and_validated':
    65     online_payment = True
    66 elif review_state == 'returning':
    67     sc_payment = True
    68 
    6964info['online_payment'] = online_payment
    7065info['sc_payment'] = sc_payment
     
    7469info['next_session'] = next_info['next_session_id']
    7570info['next_session_str'] = next_info['next_session_str']
     71
     72if review_state == 'cleared_and_validated':
     73    online_payment = True
     74elif review_state == 'returning' and info['next_session'] != session:
     75    sc_payment = True
    7676
    7777info['student_name'] = s_brain.name
  • WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py

    r2454 r2459  
    112112
    113113    study_course = getattr(student,'study_course')
     114    try:
     115        wftool.doActionFor(study_course,'open')
     116    except:
     117        pass   
    114118    study_course.getContent().edit(mapping= {'current_level': next_level_id,
    115119                                             'current_session': next_session_id,})
    116120    if next_transition:
    117         wftool.doActionFor(student,next_transition)   
    118    
     121        wftool.doActionFor(student,next_transition)
     122
    119123    #if next_session == context.getSessionId()[-2:]:
    120124    #    wftool.doActionFor(student,'pay_school_fee')
     
    126130    #    study_course_doc.edit(mapping= {'current_level': next_level,
    127131    #                                    'current_session': next_session,})
    128    
     132
    129133    logger.info('%s paid school fee by scratch card' % student_id)
    130134else:
Note: See TracChangeset for help on using the changeset viewer.