|
Last change
on this file since 647 was
647,
checked in by Henrik Bettermann, 20 years ago
|
|
unused methods marked
|
|
File size:
955 bytes
|
| Line | |
|---|
| 1 | ##parameters=member=None,sc_pin=None |
|---|
| 2 | # $Id: process_waeup_login.py 522 2006-09-15 08:36:57Z joachim $ |
|---|
| 3 | """ |
|---|
| 4 | Process a student after login |
|---|
| 5 | |
|---|
| 6 | """ |
|---|
| 7 | request = context.REQUEST |
|---|
| 8 | response=request.response |
|---|
| 9 | import DateTime |
|---|
| 10 | current = DateTime.DateTime() |
|---|
| 11 | # |
|---|
| 12 | if request.form.get('submit') == 'Login': |
|---|
| 13 | if "Manager" in member.getRoles(): |
|---|
| 14 | return |
|---|
| 15 | member_id = str(member) |
|---|
| 16 | member.setProperties(last_login_time=current,login_time=current) |
|---|
| 17 | student = getattr(context.campus.students,member_id,) |
|---|
| 18 | application = student.application |
|---|
| 19 | if context.portal_workflow.getInfoFor(student, |
|---|
| 20 | 'review_state', |
|---|
| 21 | None) == "created": |
|---|
| 22 | student.content_status_modify(workflow_action="enter_application_pin") |
|---|
| 23 | da = {} |
|---|
| 24 | pin = request.get('pin') |
|---|
| 25 | da['app_ac_pin'] = pin |
|---|
| 26 | da['app_ac_date'] = current |
|---|
| 27 | application.getContent().edit(mapping = da) |
|---|
| 28 | return response.redirect("%s/application_form" % student.application.absolute_url()) |
|---|
Note: See
TracBrowser for help on using the repository browser.