Changeset 502 for WAeUP_SRP/trunk/skins/waeup_default
- Timestamp:
- 11 Sep 2006, 10:39:59 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/process_waeup_login.py
r472 r502 7 7 request = context.REQUEST 8 8 response=request.response 9 return 10 ## 11 ##if request.form.get('submit') == 'Login': 12 ## #waeup = context.portal_catalog(id = 'demouni')[0] 13 ## #waeup = context.portal_catalog(portal_type = 'University')[0] 14 ## if 1 or "Manager" in member.getRoles(): 15 ## return 16 ###return 17 ##member_id = str(member) 9 import DateTime 10 current = DateTime.DateTime() 11 # 12 if request.form.get('submit') == 'Login': 13 if "Manager" in member.getRoles(): 14 return 15 member_id = str(member) 16 student = getattr(context.students,member_id) 17 application = student.application 18 #student.invokeFactory('StudentPersonal','personal') 19 apdoc = application.getContent() 20 names = apdoc.jamb_lastname.split() 21 dp = {} 22 if len(names) == 3: 23 dp['firstname'] = names[0].capitalize() 24 dp['middlename'] = names[1].capitalize() 25 dp['lastname'] = names[2].capitalize() 26 elif len(names) == 2: 27 dp['firstname'] = names[0].capitalize() 28 dp['lastname'] = names[1].capitalize() 29 else: 30 dp['lastname'] = apdoc.jamb_lastname 31 dp['sex'] = apdoc.jamb_sex == 'F' 32 dp['lga'] = "%s/%s" % (apdoc.jamb_state,apdoc.jamb_lga ) 33 student.personal.getContent().edit(mapping = dp) 34 ##student.content_status_modify(workflow_action="enter_application_pin") 35 36 da = {} 37 da['app_ac_pin'] = request.get('pin') 38 da['app_ac_date'] = current 39 apdoc.edit(mapping = da) 40 41 return response.redirect("%s/application_form" % student.application.absolute_url()) 42 18 43 ##ma = getattr(context,member_id) 19 44 ##jkw = {'application_sc_pin': sc_pin} … … 53 78 ##context.notifyCPSDocumentCreation(ob=pd) 54 79 ## 55 ##return response.redirect("%s" % ma.absolute_url())56 80 ###return ma.personal_addon(REQUEST=context.REQUEST) 57 81
Note: See TracChangeset for help on using the changeset viewer.