source: WAeUP_SRP/trunk/skins/waeup_default/process_waeup_login.py @ 542

Last change on this file since 542 was 522, checked in by joachim, 18 years ago

student can now loggin, status is displayed

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