Ignore:
Timestamp:
28 Oct 2007, 16:47:34 (17 years ago)
Author:
joachim
Message:

include reasons if payment is not possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/getNextInfo.py

    r2459 r2461  
    1818level_id = student_brain.level
    1919review_state = student_brain.review_state
    20 verdict = student_brain.verdict
     20info['verdict'] = student_brain.verdict
    2121info['next_transition'] = None
    2222info['next_session_id'] = next_session_id = session_id
    2323info['next_level_id'] = next_level_id = level_id
    24 
     24reasons = []
     25verdicts_voc = context.portal_vocabularies.verdicts
    2526if review_state == 'cleared_and_validated':
    2627    info['next_transition'] = "pay_school_fee"
     
    3233        if verdict not in ('A','B',):
    3334            info['next_level_id'] = level_id
    34 
     35            if not verdict:
     36                reasons += "There is no verdict."
     37            else:
     38                reasons += "Your are not a %s" % verdicts_voc.get('A')
     39                reasons += "or not a %s" % verdicts_voc.get('B')
     40        else:
     41            info['next_transition'] = "pay_school_fee"
     42info['reasons'] = reasons
    3543info['next_session_str'] = context.sessions_voc(next_session_id)
    3644
Note: See TracChangeset for help on using the changeset viewer.