## Script (Python) "getNextInfo" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student_brain ##title= ## # $Id: getNextInfo.py 2456 2007-10-28 07:09:46Z henrik $ """ return the students next info """ info = {} session_id = student_brain.session level_id = student_brain.level review_state = student_brain.review_state verdict = student_brain.verdict info['next_transition'] = None info['next_session_id'] = next_session_id = session_id info['next_level_id'] = next_level_id = level_id if review_state == 'cleared_and_validated': info['next_transition'] = "pay_school_fee" elif review_state == 'returning': if level_id: info['next_level_id'] = "%s" % (int(level_id) + 100) if session_id: info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1) if int(session_id) > int(context.getSessionId()[0]) -2: info['next_transition'] = "pay_school_fee" if verdict not in ('A','B',): info['next_level_id'] = level_id info['next_session_str'] = context.sessions_voc(next_session_id) return info