Last change
on this file was
1253,
checked in by Henrik Bettermann, 18 years ago
|
moved tool scripts to waeup_utilities
|
File size:
590 bytes
|
Line | |
---|
1 | ## Script (Python) "delete_student_from_catalog" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters=id=None, REQUEST=None |
---|
8 | ##title= |
---|
9 | ## |
---|
10 | # $Id: delete_student_from_catalog.py 805 2006-11-09 09:38:29Z henrik $ |
---|
11 | """ |
---|
12 | FIXME: add docstring. |
---|
13 | """ |
---|
14 | |
---|
15 | scat = context.students_catalog |
---|
16 | |
---|
17 | if id: |
---|
18 | stud = scat(id=id) |
---|
19 | if stud: |
---|
20 | scat.deleteRecord(stud[0].id) |
---|
21 | message = '%s (%s) removed from catalog' % (stud[0].name, id) |
---|
22 | else: |
---|
23 | message = 'Id not found' |
---|
24 | else: |
---|
25 | message = 'no Id in request' |
---|
26 | return message |
---|
27 | |
---|
28 | |
---|
Note: See
TracBrowser for help on using the repository browser.