Changeset 502 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 11 Sep 2006, 10:39:59 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
r488 r502 7 7 import DateTime 8 8 current = DateTime.DateTime() 9 pr = context.portal_registration 9 10 10 11 … … 25 26 layout_mode='create', 26 27 formaction = "apply_admission", 27 submit = "check",28 button = "Open JAMB Record", 28 29 ) 29 30 if psm == 'invalid': … … 43 44 ) 44 45 elif psm == 'valid': 45 jamb_id = ds.get('jamb_reg_no') 46 student = context.getContent().getStudentByRegNo(jamb_id) 47 if student is None: 48 psm = "JAMB record %s not accessible." % (jamb_id) 49 return context.application_pin_form(rendered = res, 50 psm = psm, 51 #psm = "%s, %s" % (psm,ds), 52 ds = ds, 53 ) 54 application = student.application 55 if context.portal_workflow.getInfoFor(student,'review_state',None) == "created": 56 #student.invokeFactory('StudentClearance','clearance') 57 student.invokeFactory('StudentPersonal','personal') 58 student.content_status_modify(workflow_action="enter_application_pin") 46 s_id = ds.get('s_id') 47 return context.REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s" 48 % (context.absolute_url(),s_id,'uNsEt',ds.get('app_ac_pin'))) 49 50 ## jamb_id = ds.get('jamb_reg_no') 51 ## student = context.getContent().getStudentByRegNo(jamb_id) 52 ## if student is None: 53 ## psm = "JAMB record %s not accessible." % (jamb_id) 54 ## return context.application_pin_form(rendered = res, 55 ## psm = psm, 56 ## #psm = "%s, %s" % (psm,ds), 57 ## ds = ds, 58 ## ) 59 ##if context.portal_workflow.getInfoFor(student,'review_state',None) == "created": 60 ## #student.invokeFactory('StudentClearance','clearance') 61 ##da = {} 62 ##pin = str(ds.get('app_ac_pin')) 63 ##da['app_ac_pin'] = pin 64 ##da['app_ac_date'] = current 65 ##apdoc.edit(mapping = da) 59 66 60 67 61 apdoc = application.getContent()62 names = apdoc.jamb_lastname.split()63 dp = {}64 if len(names) == 3:65 dp['firstname'] = names[0].capitalize()66 dp['middlename'] = names[1].capitalize()67 dp['lastname'] = names[2].capitalize()68 elif len(names) == 2:69 dp['firstname'] = names[0].capitalize()70 dp['lastname'] = names[1].capitalize()71 else:72 dp['lastname'] = apdoc.jamb_lastname73 dp['sex'] = apdoc.jamb_sex == 'F'74 dp['lga'] = "%s/%s" % (apdoc.jamb_state,apdoc.jamb_lga )75 student.personal.getContent().edit(mapping = dp)76 da = {}77 da['app_ac_pin'] = ds.get('app_ac_pin')78 da['app_ac_date'] = current79 apdoc.edit(mapping = da)80 68 # now display the passport form with jamb-data readonly 81 69 return context.REQUEST.RESPONSE.redirect("%s/application_form" % (student.application.absolute_url())) -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt
r493 r502 81 81 class="standalone" 82 82 name="cpsdocument_create_button" 83 value="apply" 84 i18n:attributes="value" tal:condition="creation" /> 83 value="apply" 84 tal:attributes="value options/button" 85 tal:condition="creation" /> 85 86 86 87 </form> 87 88 89 88 </metal:block> 90 89
Note: See TracChangeset for help on using the changeset viewer.