Last change
on this file since 1146 was
1146,
checked in by joachim, 18 years ago
|
added import for registered and results,
the csv-files must contain a modified heading
results can be viewed with session_results_anon_view
modified Courses import to use courses catalog
|
-
Property svn:keywords set to
Id
|
File size:
1.6 KB
|
Rev | Line | |
---|
[1146] | 1 | ##parameters=REQUEST |
---|
| 2 | # $Id: display_session_results.py 1146 2006-12-29 07:00:35Z joachim $ |
---|
| 3 | """ |
---|
| 4 | process the Application Form |
---|
| 5 | return html renderer + psm |
---|
| 6 | """ |
---|
| 7 | import DateTime |
---|
| 8 | current = DateTime.DateTime() |
---|
| 9 | pr = context.portal_registration |
---|
| 10 | |
---|
| 11 | validate = REQUEST.has_key("cpsdocument_create_button") |
---|
| 12 | |
---|
| 13 | lt = context.portal_layouts |
---|
| 14 | #pr = context.portal_registration |
---|
| 15 | |
---|
| 16 | res,psm,ds = lt.renderLayout(layout_id= 'student_session_results_search', |
---|
| 17 | schema_id= 'student_clearance', |
---|
| 18 | context=context, |
---|
| 19 | mapping=validate and REQUEST, |
---|
| 20 | ob={}, |
---|
| 21 | layout_mode='create', |
---|
| 22 | formaction = "display_session_results", |
---|
| 23 | button = "Search", |
---|
| 24 | commit=False, |
---|
| 25 | ) |
---|
| 26 | if psm == 'invalid': |
---|
| 27 | return context.display_session_results_form(rendered = res, |
---|
| 28 | psm = "Please correct your input!", |
---|
| 29 | #psm = "%s, %s" % (psm,ds), |
---|
| 30 | firstlayout = True, |
---|
| 31 | lastlayout = True, |
---|
| 32 | ds = ds, |
---|
| 33 | ) |
---|
| 34 | elif psm == '': |
---|
| 35 | return context.display_session_results_form(rendered = res, |
---|
| 36 | psm = None, |
---|
| 37 | firstlayout = True, |
---|
| 38 | lastlayout = True, |
---|
| 39 | ds = ds, |
---|
| 40 | ) |
---|
| 41 | elif psm == 'valid': |
---|
| 42 | return context.session_results_anon_view(student=ds.get('student'), |
---|
| 43 | results=ds.get('results')) |
---|
| 44 | |
---|
Note: See
TracBrowser for help on using the repository browser.