Last change
on this file since 798 was
744,
checked in by Henrik Bettermann, 18 years ago
|
spelling mistake corrected (maintenance)
|
File size:
618 bytes
|
Line | |
---|
1 | ## Script (Python) "cpsdocument_edit" |
---|
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: student_edit.py 486 2006-09-06 10:09:39Z joachim $ |
---|
11 | """ |
---|
12 | return the Prefix for hostel maintenance scratchcards |
---|
13 | """ |
---|
14 | info = context.getStudentInfo() |
---|
15 | prefix = "" |
---|
16 | if not info['acco']: |
---|
17 | return prefix |
---|
18 | bed = info['acco_doc'].bed |
---|
19 | hall,block,room,letter = bed.split('_') |
---|
20 | res = context.portal_catalog(portal_type="AccoHall",id=hall) |
---|
21 | if res and len(res) == 1: |
---|
22 | prefix = res[0].getObject().getContent().maintenance_code |
---|
23 | return prefix |
---|
Note: See
TracBrowser for help on using the repository browser.