source: WAeUP_SRP/trunk/skins/waeup_student/process_waeup_login.py @ 313

Last change on this file since 313 was 289, checked in by joachim, 18 years ago

=some fixes

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1##parameters=member=None,sc_pin=None
2# $Id: process_waeup_login.py 289 2006-07-08 16:49:39Z 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 1 or "Manager" in member.getRoles():
14        return
15#return
16member_id = str(member)
17ma = getattr(context,member_id)
18jkw = {'admission_sc_pin': sc_pin}
19jamb = getattr(ma,'JAMB')
20jamb.getContent().edit(mapping=jkw)
21#pdid = 'personal%s' % member_id
22pdid = 'PERSONAL'
23ma.invokeFactory('StudentPersonal', pdid)
24pd = getattr(ma,pdid)
25pkw = {}
26jc = jamb.getContent()
27pkw['sex'] = getattr(jc,'sex')
28pkw['firstname'] = getattr(jc,'firstname')
29pkw['middlename'] = getattr(jc,'middlename')
30pkw['lastname'] = getattr(jc,'lastname')
31pkw['aggregate'] = getattr(jc,'aggregate')
32pkw['faculty'] = getattr(jc,'faculty')
33pkw['course'] = getattr(jc,'course')
34pkw['age'] = getattr(jc,'age')
35pkw['jamb_results'] = getattr(jc,'exam_results')
36pkw['jamb_aggregate'] = getattr(jc,'aggregate')
37pkw['jamb_listing_date'] = getattr(jc,'listing_date')
38pkw['state'] = getattr(jc,'state')
39
40pd.getContent().edit(mapping=pkw)
41context.notifyCPSDocumentCreation(ob=pd)
42
43pdid = 'DOCUMENTS'
44ma.invokeFactory('StudentDocuments', pdid)
45pd = getattr(ma,pdid)
46context.notifyCPSDocumentCreation(ob=pd)
47
48pdid = 'ELIGIBILITY'
49ma.invokeFactory('StudentEligibility', pdid)
50pd = getattr(ma,pdid)
51pd.getContent().edit(mapping=pkw)
52context.notifyCPSDocumentCreation(ob=pd)
53
54return response.redirect("%s" % ma.absolute_url())
55#return ma.personal_addon(REQUEST=context.REQUEST)
56
Note: See TracBrowser for help on using the repository browser.