##parameters=member=None,sc_pin=None # $Id: process_waeup_login.py 251 2006-06-06 08:07:12Z joachim $ """ Process a student after login """ request = context.REQUEST response=request.response if request.form.get('submit') == 'Login': #waeup = context.portal_catalog(id = 'demouni')[0] #waeup = context.portal_catalog(portal_type = 'University')[0] if "Manager" in member.getRoles(): return member_id = str(member) ma = getattr(context,member_id) jkw = {'admission_sc_pin': sc_pin} jamb = getattr(ma,'JAMB') jamb.getContent().edit(mapping=jkw) #pdid = 'personal%s' % member_id pdid = 'PERSONAL' ma.invokeFactory('StudentPersonal', pdid) pd = getattr(ma,pdid) pkw = {} jc = jamb.getContent() pkw['sex'] = getattr(jc,'sex') pkw['firstname'] = getattr(jc,'firstname') pkw['middlename'] = getattr(jc,'middlename') pkw['lastname'] = getattr(jc,'lastname') pkw['aggregate'] = getattr(jc,'aggregate') pkw['faculty'] = getattr(jc,'faculty') pkw['course'] = getattr(jc,'course') pkw['age'] = getattr(jc,'age') pkw['jamb_results'] = getattr(jc,'exam_results') pkw['jamb_aggregate'] = getattr(jc,'aggregate') pkw['jamb_listing_date'] = getattr(jc,'listing_date') pkw['state'] = getattr(jc,'state') pd.getContent().edit(mapping=pkw) context.notifyCPSDocumentCreation(ob=pd) pdid = 'DOCUMENTS' ma.invokeFactory('StudentDocuments', pdid) pd = getattr(ma,pdid) context.notifyCPSDocumentCreation(ob=pd) pdid = 'ELIGIBILITY' ma.invokeFactory('StudentEligibility', pdid) pd = getattr(ma,pdid) pd.getContent().edit(mapping=pkw) context.notifyCPSDocumentCreation(ob=pd) return response.redirect("%s" % ma.absolute_url()) #return ma.personal_addon(REQUEST=context.REQUEST)