source: WAeUP_SRP/branches/srpp_branch/skins/waeup_student/process_waeup_login.py @ 7637

Last change on this file since 7637 was 182, checked in by joachim, 19 years ago

=eligibility edit geht fast

  • 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 182 2005-11-16 23:30:12Z 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 = {}
27jc = jamb.getContent()
28pkw['sex'] = getattr(jc,'sex')
29pkw['firstname'] = getattr(jc,'firstname')
30pkw['middlename'] = getattr(jc,'middlename')
31pkw['lastname'] = getattr(jc,'lastname')
32pkw['aggregate'] = getattr(jc,'aggregate')
33pkw['faculty'] = getattr(jc,'faculty')
34pkw['course'] = getattr(jc,'course')
35pkw['age'] = getattr(jc,'age')
36pkw['jamb_results'] = getattr(jc,'exam_results')
37pkw['jamb_aggregate'] = getattr(jc,'aggregate')
38pkw['jamb_listing_date'] = getattr(jc,'listing_date')
39pkw['state'] = getattr(jc,'state')
40
41pd.getContent().edit(mapping=pkw)
42context.notifyCPSDocumentCreation(ob=pd)
43
44pdid = 'DOCUMENTS'
45ma.invokeFactory('StudentDocuments', pdid)
46pd = getattr(ma,pdid)
47context.notifyCPSDocumentCreation(ob=pd)
48
49pdid = 'ELIGIBILITY'
50ma.invokeFactory('StudentEligibility', pdid)
51pd = getattr(ma,pdid)
52pd.getContent().edit(mapping=pkw)
53context.notifyCPSDocumentCreation(ob=pd)
54
55return response.redirect("%s" % ma.absolute_url())
56#return ma.personal_addon(REQUEST=context.REQUEST)
57
Note: See TracBrowser for help on using the repository browser.