Last change
on this file since 1316 was
1286,
checked in by Henrik Bettermann, 18 years ago
|
new student statistics
sc payment beautified
student workflow state and transition renamed
|
-
Property svn:keywords set to
Id
|
File size:
770 bytes
|
Line | |
---|
1 | ## Script (Python) "getMaintenancePrefix" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters= |
---|
8 | ##title= |
---|
9 | ## |
---|
10 | # $Id:getMaintenancePrefix.py 486 2006-09-06 10:09:39Z joachim $ |
---|
11 | """ |
---|
12 | return the Prefix for Schoolfee |
---|
13 | """ |
---|
14 | student_id = context.getStudentId() |
---|
15 | sbrain = context.students_catalog(id=student_id)[0] |
---|
16 | res = context.portal_catalog(portal_type="Certificate", |
---|
17 | id = sbrain.course) |
---|
18 | if not res: |
---|
19 | logger.info('"%s","certificate not found", "%s"' % (student_id,course)) |
---|
20 | prefix = "--" |
---|
21 | else: |
---|
22 | prefix = res[0].getObject().getContent().school_fee_code |
---|
23 | if not prefix or prefix == 'none': |
---|
24 | prefix = res[0].getPath().split('/')[-4] |
---|
25 | return prefix |
---|
Note: See
TracBrowser for help on using the repository browser.