Changeset 966 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
29 Nov 2006, 14:26:31 (18 years ago)
Author:
joachim
Message:

created new catalog pumeresults for pumeresult checking
modified pume_anon_view and pume_anon_slip to use it.

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
6 edited
3 copied

Legend:

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

    r892 r966  
    4444                                 )
    4545elif psm == 'valid':
    46     url = "%s/campus/students/%s/pume/pume_anon_view" % (context.portal_url(),ds['s_id'])
    47     return REQUEST.RESPONSE.redirect(url)
    48 
    49 
    50 return
    51 
    52 
     46    return context.pume_anon_view(pume=ds['pume'])
     47##    url = "%s/campus/students/%s/pume/pume_anon_view" % (context.portal_url(),ds['s_id'])
     48##    return REQUEST.RESPONSE.redirect(url)
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r913 r966  
    4848info['app'] = student.application
    4949info['app_doc'] = student.application.getContent()
    50 info['per'] = student.personal
    51 info['per_doc'] = student.personal.getContent()
     50info['per'] = getattr(student,'personal',None)
     51info['sex'] = 'male'
     52if info['per'] is not None:
     53    info['per_doc'] = student.personal.getContent()
     54    if info['per_doc'].sex:
     55        info['sex'] = 'female'
     56else:
     57    if info['app_doc'].jamb_sex == "F":
     58        info['sex'] = 'female'
    5259course = getattr(student,'study_course',None)
    53 #
    5460info['course'] = course
    5561if course:
    5662    info['course_doc'] = student.study_course.getContent()
    57 info['sex'] = 'male'
    58 if info['per_doc'].sex:
    59     info['sex'] = 'female'
    6063#
    6164acco = getattr(student,'accommodation_2006',None)
  • WAeUP_SRP/trunk/skins/waeup_student/pume_anon_slip.pt

    r805 r966  
    1 <metal:html tal:define="app_doc python: context.aq_parent.application.getContent();
    2                         pume_doc python: context.getContent()">
     1<metal:html tal:define="pume python:context.portal_pumeresults(jamb_reg_no=request.get('nr'))[0]">
    32  <metal:body use-macro="here/main_template/macros/master">
    43    <metal:main fill-slot="main">
    5       <h3>PUME Results of <span tal:content="app_doc/jamb_firstname" />
    6                             <span tal:content="app_doc/jamb_lastname" /></h3>
    7 
    8       <br />
    9       <span tal:omit-tag=""
    10             tal:content="structure python: app_doc.render(proxy=app_doc,
    11             layout_mode='view_info',
    12             layout_id='student_application_fe')"
    13             />
    14       <span tal:condition="python:1" tal:omit-tag=""
    15             tal:content="structure python: pume_doc.render(proxy=pume_doc,
    16             layout_mode='view_slip',
    17             layout_id='student_pume_fe')"
    18             />
     4        <h3>PUME Results of <span tal:content="pume/name" /></h3>
     5                           
     6       <br />                           
     7       <table>
     8        <tr>
     9          <th>JAMB Registration Nr</th><td tal:content="pume/jamb_reg_no"></td>
     10        </tr>
     11        <tr>
     12          <th>Name</th><td tal:content="pume/name"></td>
     13        </tr>
     14        <tr>
     15          <th>Score</th><td tal:content="pume/score"></td>
     16        </tr>
     17        <tr>
     18          <th>Status</th><td tal:content="pume/status"></td>
     19        </tr>
     20        <tr>
     21          <th>Course Requested</th><td tal:content="pume/course"></td>
     22        </tr>
     23      </table>
    1924    </metal:main>
    2025  </metal:body>
  • WAeUP_SRP/trunk/skins/waeup_student/pume_anon_view.pt

    r826 r966  
    1 <metal:html tal:define="app_doc python: context.aq_parent.application.getContent();
    2                         pume_doc python: context.getContent()">
     1<metal:html tal:define="pume options/pume">
    32  <metal:body use-macro="here/main_template/macros/master">
    43    <metal:main fill-slot="main">
    5 
    6            
    74        <div style="text-align: right">
    8         <a href="" target="slip" tal:attributes="href string:pume_anon_slip"
     5        <a href="" target="slip" tal:attributes="href string:pume_anon_slip?nr=${pume/jamb_reg_no}"
    96            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
    107            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
     
    1310        </div>
    1411
    15         <h3>PUME Results of <span tal:content="app_doc/jamb_firstname" />
    16                             <span tal:content="app_doc/jamb_lastname" /></h3>
     12        <h3>PUME Results of <span tal:content="pume/name" /></h3>
    1713                           
    1814       <br />                           
    19 
    20         <span tal:omit-tag=""
    21               tal:content="structure python: app_doc.render(proxy=app_doc,
    22               layout_mode='view_info',
    23               layout_id='student_application_fe')"
    24               />       
    25         <span tal:omit-tag=""
    26               tal:content="structure python: pume_doc.render(proxy=pume_doc,
    27               layout_mode='view_slip',
    28               layout_id='student_pume_fe')"
    29               />
    30 
     15       <table>
     16        <tr>
     17          <th>JAMB Registration Nr</th><td tal:content="pume/jamb_reg_no"></td>
     18        </tr>
     19        <tr>
     20          <th>Name</th><td tal:content="pume/name"></td>
     21        </tr>
     22        <tr>
     23          <th>Score</th><td tal:content="pume/score"></td>
     24        </tr>
     25        <tr>
     26          <th>Status</th><td tal:content="pume/status"></td>
     27        </tr>
     28        <tr>
     29          <th>Course Requested</th><td tal:content="pume/course"></td>
     30        </tr>
     31      </table>
    3132    </metal:main>
    3233  </metal:body>
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r920 r966  
    5454        'search_string': ''
    5555        }
    56 
     56#from Products.zdb import set_trace
     57#set_trace()
    5758rend,psm,ds = lt.renderLayout(layout_id= 'student_search',
    5859                      schema_id= 'student_search',
     
    7071                             allowed = True,
    7172                             )
     73#set_trace()
    7274what = ds.get('search_mode')
    7375state = ds.get('review_state')
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r920 r966  
    5858                       tal:content="student/id"></a></td>   
    5959                <td>
    60                   <span tal:replace="python: student['per_doc'].firstname" />
    61                   <span tal:replace="python: student['per_doc'].middlename" />
    62                   <span tal:replace="python: student['per_doc'].lastname" />
     60                  <span tal:replace="student/name" />
    6361                </td>   
    6462                <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>   
     
    6967                          onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"
    7068                          >[change state]</a></td>
    71                        
    72                        
    73                        
    74                        
    7569                <td tal:condition="not: options/co_view|nothing"><span tal:replace="student/review_state" /></td>   
    7670              </tr>
Note: See TracChangeset for help on using the changeset viewer.