Changeset 1169 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
1 Jan 2007, 16:38:46 (18 years ago)
Author:
joachim
Message:

display_session_results now asks for jamb_reg_no
set_access_data uses this information
permission mappings for new states in waeup_student_wf added
set_access_data is now called from a form

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/createReturningStudent.py

    r1160 r1169  
    88##title=
    99##
    10 # $Id: createStudentFT.py 1151 2006-12-29 22:05:53Z joachim $
    11 ''' create the Studenbase folder'''
     10# $Id: createReturningStudent.py 1151 2006-12-29 22:05:53Z joachim $
     11''' create the Studentbase folder'''
    1212
    1313
     
    3030    return "MatricNo %s not found in Returning Table" % matric_no
    3131student_brain = res[0]
    32 sid = context.waeup_tool.generateStudentId(student_brain.Firstname[0])
     32sid = context.waeup_tool.generateStudentId('?')
    3333students_folder.invokeFactory('Student', sid)
    3434logger.info('"%s","Created Student","%s", "%s" ' % (member,sid,matric_no))
    3535student = getattr(students_folder,sid)
    36 wftool.doActionFor(student,'clear_and_validate')
     36wftool.doActionFor(student,'return')
    3737student.manage_setLocalRoles(sid, ['Owner',])
     38jamb_reg_no = student_brain.Entryregno,
    3839context.students_catalog.addRecord(id = sid,
    3940                                   matric_no = matric_no,
    40                                    jamb_reg_no = student_brain.Entryregno,
     41                                   jamb_reg_no = jamb_reg_no,
    4142                                   sex = student_brain.Sex == "F",
    4243                                   name = "%s %s %s" % (student_brain.Firstname,
     
    4445                                                        student_brain.Lastname)
    4546                                )
    46 return "Student MatricNo %s and %s created" % (matric_no,sid)
     47return "Student MatricNo %s, StudentId %s Jamb %s created" % (matric_no,sid,jamb_reg_no)
    4748
  • WAeUP_SRP/trunk/skins/waeup_student/entry_results_anon_view.pt

    r1123 r1169  
    1 <metal:html tal:define="pume options/pume">
     1<metal:html tal:define="pume options/pume;
     2                      result_type pume/result_type|string:PU">
    23  <metal:body use-macro="here/main_template/macros/master">
    34    <metal:main fill-slot="main">
    45
    5         <span tal:condition="python:pume['result_type']!='DE'">       
     6        <span tal:condition="python:result_type =='PU'">       
    67        <div style="text-align: right">
    78        <a href="" target="slip" tal:attributes="href string:entry_results_anon_slip?nr=${pume/jamb_reg_no}"
     
    1415        </span>       
    1516                     
    16         <span tal:condition="python:pume['result_type']=='DE'">
     17        <span tal:condition="python:result_type == 'DE'">
    1718        <div style="text-align: right">
    1819        <a href="" target="slip" tal:attributes="href string:entry_results_anon_slip?nr=${pume/jamb_reg_no}"
  • WAeUP_SRP/trunk/skins/waeup_student/session_results_anon_view.pt

    r1166 r1169  
    5959      </table>
    6060      <br />
    61       <a href="" tal:attributes="href string:${context/absolute_url}/set_access_data?matric_no=${student/matric_no}">
    62         Continue to Login!
    63       </a>
     61      <form action="" method="post"
     62            tal:attributes="action string:${context/portal_url}/set_access_data">
     63        <input type="hidden" name="matric_no" tal:attributes="value student/matric_no" />
     64        <input type="hidden" name="jamb_reg_no" tal:attributes="value student/Entryregno" />
     65        <input type="submit"
     66               class="standalone"
     67               value="Continue to Login!"
     68               name="submit" />
     69      </form>
    6470    </metal:main>
    6571  </metal:body>
  • WAeUP_SRP/trunk/skins/waeup_student/set_access_data.py

    r1158 r1169  
    4242elif psm == 'valid':
    4343    pass
    44     jamb_reg_no = ds.get('jamb_reg_no')
    45     r = context.returning_import(matric_no = matric_no)
    46     if r and r[0].Entryregno != jamb_reg_no or not r:
    47         psm = "Your Jamb Registration Nr is wrong"
    48         return context.set_access_data_form(rendered = res,
    49                                  psm = psm,
    50                                  firstlayout = True,
    51                                  lastlayout = True,
    52                                  ds = ds,
    53                                  )
     44##    jamb_reg_no = ds.get('jamb_reg_no')
     45##    r = context.returning_import(matric_no = matric_no)
     46##    if r and r[0].Entryregno != jamb_reg_no or not r:
     47##        psm = "Your Jamb Registration Nr is wrong"
     48##        return context.set_access_data_form(rendered = res,
     49##                                 psm = psm,
     50##                                 firstlayout = True,
     51##                                 lastlayout = True,
     52##                                 ds = ds,
     53##                                 )
    5454## from Products.zdb import set_trace;set_trace()
    5555password = REQUEST.get('widget__password')
     
    6464args['returning'] = '1'
    6565args['email'] = email
     66args['phone_nr'] = ds.get('phone_nr')
    6667from urllib import urlencode
    6768url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args))
Note: See TracChangeset for help on using the changeset viewer.