Last change
on this file since 6902 was
6898,
checked in by Henrik Bettermann, 13 years ago
|
In the base package we can only create payment tickets with amount = 0. Amount calculation must be done in customization packages.
|
-
Property svn:keywords set to
Id
|
File size:
1006 bytes
|
Rev | Line | |
---|
[6651] | 1 | """General helper functions for the student section. |
---|
| 2 | """ |
---|
| 3 | |
---|
[6662] | 4 | from random import SystemRandom as r |
---|
[6876] | 5 | from waeup.sirp.students.vocabularies import academic_sessions_vocab |
---|
[6651] | 6 | |
---|
[6749] | 7 | def generate_student_id(students,letter): |
---|
[6651] | 8 | if letter == '?': |
---|
[6664] | 9 | letter= r().choice('ABCDEFGHKLMNPQRSTUVWXY') |
---|
| 10 | sid = u"%c%d" % (letter,r().randint(99999,1000000)) |
---|
[6749] | 11 | while sid in students.keys(): |
---|
[6664] | 12 | sid = u"%c%d" % (letter,r().randint(99999,1000000)) |
---|
[6662] | 13 | return sid |
---|
[6742] | 14 | |
---|
| 15 | def set_returning_data(student): |
---|
| 16 | student['studycourse'].current_level += 100 |
---|
| 17 | student['studycourse'].current_session += 1 |
---|
| 18 | verdict = student['studycourse'].current_verdict |
---|
[6804] | 19 | student['studycourse'].current_verdict = '0' |
---|
[6742] | 20 | student['studycourse'].previous_verdict = verdict |
---|
| 21 | return |
---|
[6876] | 22 | |
---|
[6898] | 23 | # To be defined in customization packages |
---|
[6876] | 24 | def getPaymentDetails(category, student): |
---|
[6898] | 25 | p_session = None |
---|
[6876] | 26 | surcharge_1 = surcharge_2 = surcharge_3 = 0 |
---|
[6877] | 27 | p_item = u'' |
---|
[6898] | 28 | amount = 0 |
---|
[6877] | 29 | return amount, p_item, p_session, surcharge_1, surcharge_2, surcharge_3 |
---|
Note: See
TracBrowser for help on using the repository browser.