Ignore:
Timestamp:
30 Nov 2006, 19:31:01 (18 years ago)
Author:
joachim
Message:

modified pumeresults upload to update results
filename must be pup_update
IMPORTANT the heading must be the same as in the first upload.
Resolved PUME Results contains a different heading.
Import of admitted Students with pictures
students_catalog created
searchStudents speedup

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

Legend:

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

    r966 r971  
    3434student_path = "%s/campus/students/%s" % (context.portal_url.getPortalPath(),student_id)
    3535student = context.restrictedTraverse(student_path,default=None)
     36#from Products.zdb import set_trace
     37#set_trace()
     38
    3639if student is None or student.portal_type != 'Student':
    3740    return None
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r966 r971  
    6262                      ob=default,
    6363                      layout_mode='edit',
    64                       formaction="search_students"
     64                      formaction="search_students",
     65                      commit = False,
    6566                      )
    6667if psm == '':
     
    6869                             psm = psm,
    6970                             #psm = "%s, %s" % (psm,ds),
    70                              students = items,
     71                             students = [],
    7172                             allowed = True,
    7273                             )
     
    127128if res:
    128129    for r in res:
    129         if r.portal_type in ("StudentStudyLevel",):
    130             student = r.getObject().aq_parent.aq_parent
    131         elif r.portal_type in student_subobjects:
    132             student = r.getObject().aq_parent
    133         else:
    134             student = r.getObject()
    135         search_set.append(student)
     130        pl = r.getPath().split('/')
     131        search_set.append(pl[pl.index('students') + 1])
    136132review_set = []
    137133if review_res:
    138134    for r in review_res:
    139         if r.portal_type in ("StudentStudyLevel",):
    140             student = r.getObject().aq_parent.aq_parent
    141         elif r.portal_type in student_subobjects:
    142             student = r.getObject().aq_parent
    143         else:
    144             student = r.getObject()
    145         review_set.append(student)
     135        pl = r.getPath().split('/')
     136        review_set.append(pl[pl.index('students') + 1])
    146137all = []
    147138if only_review:
     
    158149    items.append(a)
    159150students = []
    160 items.sort(cmp_id)
     151items.sort()
    161152co_view = False
    162153if items:
    163154    for item in items:
    164155        #if context.isClearanceOfficer(info):
     156        info = {}
    165157        if "ClearanceOfficers" in member.getGroups():
    166158            co_view = True
    167             droles = member.getRolesInContext(item)
    168             if "ClearanceOfficer" in droles:
    169                 info = context.getStudentInfo(item)
    170                 students.append(info)
     159##            droles = member.getRolesInContext(item)
     160##            if "ClearanceOfficer" in droles:
     161##                info = context.getStudentInfo(item)
     162##                students.append(info)
    171163        else:
    172             info = context.getStudentInfo(item)
    173             students.append(info)
     164            #info = context.getStudentInfo(item)
     165            info = context.students_catalog(id = item)
     166            if len(info) == 1:
     167                students.append(info[0])
    174168
    175169    return context.search_students_form(rendered = rend,
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r966 r971  
    5555              <tr tal:condition="student"
    5656                  tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
    57                 <td><a href="id" tal:attributes="href string:${student/student/absolute_url}"
     57                <td><a href="id" tal:attributes="href string:${context/portal_url}/campus/students/${student/id}"
    5858                       tal:content="student/id"></a></td>   
    5959                <td>
    6060                  <span tal:replace="student/name" />
    6161                </td>   
    62                 <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>   
     62                <td><span tal:replace="student/jamb_reg_no" /></td>   
    6363                <td tal:condition="options/co_view|nothing">
    6464                       <a href="id"
     
    6767                          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')"
    6868                          >[change state]</a></td>
    69                 <td tal:condition="not: options/co_view|nothing"><span tal:replace="student/review_state" /></td>   
     69                <td tal:condition="options/co_view|nothing"><span tal:replace="student/review_state" /></td>   
    7070              </tr>
    7171            </span>
Note: See TracChangeset for help on using the changeset viewer.