Changeset 886 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
17 Nov 2006, 16:27:37 (18 years ago)
Author:
joachim
Message:

removed co_searchStudents

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
1 deleted
2 edited

Legend:

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

    r885 r886  
    1 ## Script (Python) "searchStudents"
     1## Script (Python) "co_searchStudents"
    22##bind container=container
    33##bind context=context
     
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=
     7##parameters=REQUEST
    88##title=
    99##
    1010# $Id$
    1111"""
    12 return Info about the current Student
     12list Students for ClearanceOfficers
    1313"""
     14request = REQUEST
     15wftool = context.portal_workflow
     16mtool = context.portal_membership
     17member = mtool.getAuthenticatedMember()
     18roles = member.getRolesInContext(context)
    1419try:
    1520    from Products.AdvancedQuery import Eq, Between, Le,In
     
    4449pr = context.portal_registration
    4550path_info = request.get('PATH_INFO').split('/')
    46 is_manager = context.isManager
     51is_manager = context.isManager()
    4752validate = request.has_key("cpsdocument_edit_button")
    4853default = {'search_mode': 'name',
    49         'review_state': 'all',
     54        'review_state': 'clearance_requested',
    5055        'search_string': ''
    5156        }
     
    155160if items:
    156161    for item in items:
    157         info = context.getStudentInfo(item)
    158         students.append(info)
     162        #if context.isClearanceOfficer(info):
     163        if "ClearanceOfficers" in member.getGroups():
     164            droles = member.getRolesInContext(item)
     165            if "ClearanceOfficer" in droles:
     166                info = context.getStudentInfo(item)
     167                students.append(info)
     168        else:
     169            info = context.getStudentInfo(item)
     170            students.append(info)
     171               
    159172    return context.students_manager_view(rendered = rend,
    160                              psm = "%d,%d matching Students found QS = %s" %\
    161                                     (len(review_set),len(search_set),query_step),
     173                             psm = "",
     174                             #psm = "%d,%d matching Students found QS = %s" %\
     175                             #       (len(review_set),len(search_set),query_step),
    162176                             #psm = "%d found QS = %s items: %s" % (len(items),query_step,items),
    163177                             students = students,
     
    169183                             allowed = True,
    170184                             )
     185
     186
  • WAeUP_SRP/trunk/skins/waeup_student/students_index.py

    r881 r886  
    2424
    2525if "ClearanceOfficers" in member.getGroups():
    26     return redirect("%s/co_searchStudents" % students_url)
     26    return redirect("%s/searchStudents" % students_url)
    2727if context.isManager():
    2828    return redirect("%s/searchStudents" % students_url)
Note: See TracChangeset for help on using the changeset viewer.