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

Last change on this file since 142 was 137, checked in by joachim, 19 years ago

=temporary view all fixed accomodation view

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1##parameters=member=None,sc_pin=None
2# $Id: process_waeup_login.py 137 2005-11-01 16:50:42Z 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 = 'demouni')[0]
12    waeup = context.portal_catalog(portal_type = 'University')[0]
13    if "Manager" in member.getRoles():
14        return
15    return response.redirect(waeup.getURL())
16
17member_id = str(member)
18ma = getattr(context,member_id)
19jkw = {'admission_sc_pin': sc_pin}
20jamb = getattr(ma,'JAMB')
21jamb.getContent().edit(mapping=jkw)
22#pdid = 'personal%s' % member_id
23pdid = 'PERSONAL'
24ma.invokeFactory('StudentPersonal', pdid)
25pd = getattr(ma,pdid)
26pkw = {}
27pkw['sex'] = getattr(jamb,'sex')
28pkw['firstname'] = getattr(jamb,'firstname')
29pkw['middlename'] = getattr(jamb,'middlename')
30pkw['lastname'] = getattr(jamb,'lastname')
31pkw['aggregate'] = getattr(jamb,'aggregate')
32pkw['faculty'] = getattr(jamb,'faculty')
33pkw['age'] = getattr(jamb,'age')
34pkw['state'] = getattr(jamb,'state')
35
36pd.edit(mapping=pkw)
37context.notifyCPSDocumentCreation(ob=pd)
38return response.redirect(ma.absolute_url())
39
Note: See TracBrowser for help on using the repository browser.