Last change
on this file since 2452 was
2451,
checked in by joachim, 18 years ago
|
new getNextInfo used in pay_by_sc
|
-
Property svn:keywords set to
Id
|
File size:
802 bytes
|
Line | |
---|
1 | ## Script (Python) "getSessionId" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters=student_brain |
---|
8 | ##title= |
---|
9 | ## |
---|
10 | # $Id: getNextInfo.py 2451 2007-10-27 14:26:41Z joachim $ |
---|
11 | """ |
---|
12 | return the students next info |
---|
13 | """ |
---|
14 | info = {} |
---|
15 | info['next_transition'] = None |
---|
16 | session_id = student_brain.session |
---|
17 | if int(session_id) > int(context.getSessionId()[3:4]) -2: |
---|
18 | info['next_transition'] = "pay_school_fee" |
---|
19 | |
---|
20 | if student_brain.review_state == "returning": |
---|
21 | session_id info['next_session_id'] = "%02d" % int(session_id) + 1 |
---|
22 | info['next_session_str'] = context.session_voc(session_id) |
---|
23 | next_level_id = student_brain.level |
---|
24 | if student_brain.review_state not in ('cleared_and_validated',) |
---|
25 | next_level_id = "%s" % (int(next_level_id) + 100) |
---|
26 | info['next_level_id'] = next_level_id |
---|
27 | |
---|
28 | |
---|
29 | return info |
---|
Note: See
TracBrowser for help on using the repository browser.