Ignore:
Timestamp:
13 Sep 2006, 06:47:55 (18 years ago)
Author:
joachim
Message:

pin checking and login for JAMB students

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_default/process_waeup_login.py

    r506 r511  
    1313    if "Manager" in member.getRoles():
    1414        return
    15 return
    1615member_id = str(member)
    1716student = getattr(context.students,member_id)
    1817application = student.application
    19 student.invokeFactory('StudentPersonal','personal')
    20 apdoc = application.getContent()
    21 names = apdoc.jamb_lastname.split()
    22 dp = {}
    23 if len(names) == 3:
    24     dp['firstname'] = names[0].capitalize()
    25     dp['middlename'] = names[1].capitalize()
    26     dp['lastname'] = names[2].capitalize()
    27 elif len(names) == 2:
    28     dp['firstname'] = names[0].capitalize()
    29     dp['lastname'] = names[1].capitalize()
    30 else:
    31     dp['lastname'] = apdoc.jamb_lastname
    32     dp['sex'] = apdoc.jamb_sex == 'F'
    33     dp['lga'] = "%s/%s" % (apdoc.jamb_state,apdoc.jamb_lga )
    34 student.personal.getContent().edit(mapping = dp)
    3518##student.content_status_modify(workflow_action="enter_application_pin")
    36 
    3719da = {}
    38 da['app_ac_pin'] = request.get('pin')
     20pin = request.get('pin')
     21da['app_ac_pin'] = pin
    3922da['app_ac_date'] = current
    40 apdoc.edit(mapping = da)
    41 
     23application.getContent().edit(mapping = da)
    4224return response.redirect("%s/application_form" % student.application.absolute_url())
    43 
    44 ##ma = getattr(context,member_id)
    45 ##jkw = {'application_sc_pin': sc_pin}
    46 ##jamb = getattr(ma,'JAMB')
    47 ##jamb.getContent().edit(mapping=jkw)
    48 ###pdid = 'personal%s' % member_id
    49 ##pdid = 'PERSONAL'
    50 ##ma.invokeFactory('StudentPersonal', pdid)
    51 ##pd = getattr(ma,pdid)
    52 ##pkw = {}
    53 ##jc = jamb.getContent()
    54 ##pkw['sex'] = getattr(jc,'sex')
    55 ##pkw['firstname'] = getattr(jc,'firstname')
    56 ##pkw['middlename'] = getattr(jc,'middlename')
    57 ##pkw['lastname'] = getattr(jc,'lastname')
    58 ##pkw['aggregate'] = getattr(jc,'aggregate')
    59 ##pkw['faculty'] = getattr(jc,'faculty')
    60 ##pkw['course'] = getattr(jc,'course')
    61 ##pkw['age'] = getattr(jc,'age')
    62 ##pkw['jamb_results'] = getattr(jc,'exam_results')
    63 ##pkw['jamb_aggregate'] = getattr(jc,'aggregate')
    64 ##pkw['jamb_listing_date'] = getattr(jc,'listing_date')
    65 ##pkw['state'] = getattr(jc,'state')
    66 ##
    67 ##pd.getContent().edit(mapping=pkw)
    68 ##context.notifyCPSDocumentCreation(ob=pd)
    69 ##
    70 ##pdid = 'DOCUMENTS'
    71 ##ma.invokeFactory('StudentDocuments', pdid)
    72 ##pd = getattr(ma,pdid)
    73 ##context.notifyCPSDocumentCreation(ob=pd)
    74 ##
    75 ##pdid = 'ELIGIBILITY'
    76 ##ma.invokeFactory('StudentEligibility', pdid)
    77 ##pd = getattr(ma,pdid)
    78 ##pd.getContent().edit(mapping=pkw)
    79 ##context.notifyCPSDocumentCreation(ob=pd)
    80 ##
    81 ###return ma.personal_addon(REQUEST=context.REQUEST)
    82 
Note: See TracChangeset for help on using the changeset viewer.