source: waeup_product/trunk/skins/waeup_student/process_waeup_login.py @ 90

Last change on this file since 90 was 88, checked in by joachim, 19 years ago

=fixes

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1##parameters=member=None,sc_pin=None
2# $Id: process_waeup_login.py 88 2005-10-26 08:39:01Z joachim $
3"""
4Process a student after login
5
6"""
7request = context.REQUEST
8response=request.response
9
10if request.form.get('submit') == 'Login':
11    waeup = context.portal_catalog(id = 'waeup')[0]
12    if "Manager" in member.getRoles():
13        return
14    return response.redirect(waeup.getURL())
15       
16member_id = str(member)
17ma = getattr(context,member_id)
18jkw = {'admission_sc_pin': sc_pin}
19jamb = getattr(ma,'JAMB')
20jamb.edit(mapping=jkw)
21#pdid = 'personal%s' % member_id
22pdid = 'PERSONAL'
23ma.invokeFactory('StudentPersonal', pdid)
24pd = getattr(ma,pdid)   
25pkw = {}
26pkw['sex'] = getattr(jamb,'sex')
27pkw['firstname'] = getattr(jamb,'firstname')
28pkw['middlename'] = getattr(jamb,'middlename')
29pkw['lastname'] = getattr(jamb,'lastname')
30pkw['aggregate'] = getattr(jamb,'aggregate')
31pkw['faculty'] = getattr(jamb,'faculty')
32pkw['age'] = getattr(jamb,'age')
33pkw['state'] = getattr(jamb,'state')
34
35pd.edit(mapping=pkw)
36context.notifyCPSDocumentCreation(ob=pd)
37return response.redirect(ma.absolute_url())
38
Note: See TracBrowser for help on using the repository browser.