Index: WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py
===================================================================
--- WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py	(revision 881)
+++ WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py	(revision 881)
@@ -0,0 +1,90 @@
+from AccessControl import ClassSecurityInfo
+from ExtensionClass import Base
+from Acquisition import Implicit
+from Acquisition import aq_base, aq_parent, aq_inner
+
+security = ClassSecurityInfo()
+
+security.declarePublic('getRolesInContext')
+def getRolesInContext(self, object):
+    """Get the list of roles assigned to the user.
+    This includes local roles assigned in the context of
+    the passed in object.
+    Knows about local roles blocking (roles starting with '-').
+    """
+    name = self.getUserName()
+    roles = self.getRoles()
+    # deal with groups
+    groups = self.getComputedGroups()
+    # end groups
+    local = {}
+    stop_loop = 0
+    real_object = object
+    object = aq_inner(object)
+    while 1:
+        # Collect all roles info
+        lrd = {}
+        local_roles = getattr(object, '__ac_local_roles__', None)
+        if local_roles:
+            if callable(local_roles):
+                local_roles = local_roles() or {}
+            for r in local_roles.get(name, ()):
+                if r:
+                    lrd[r] = None
+        local_group_roles = getattr(object, '__ac_local_group_roles__', None)
+        if local_group_roles:
+            if callable(local_group_roles):
+                local_group_roles = local_group_roles() or {}
+            for g in groups:
+                for r in local_group_roles.get(g, ()):
+                    if r:
+                        lrd[r] = None
+        lr = lrd.keys()
+        # Positive role assertions
+        for r in lr:
+            if r[0] != '-':
+                if not local.has_key(r):
+                    local[r] = 1 # acquired role
+        # Negative (blocking) role assertions
+        for r in lr:
+            if r[0] == '-':
+                r = r[1:]
+                if not r:
+                    # role '-' blocks all acquisition
+                    stop_loop = 1
+                    break
+                if not local.has_key(r):
+                    local[r] = 0 # blocked role
+        if stop_loop:
+            break
+        if hasattr(object, 'aq_parent'):
+            object = aq_inner(object.aq_parent)
+            continue
+        if hasattr(object, 'im_self'):
+            object = aq_inner(object.im_self)
+            continue
+        break
+    roles = list(roles)
+    for r, v in local.items():
+        if v: # only if not blocked
+            roles.append(r)
+    ## patch to assign dynamic roles for WAeUP
+    while 1:
+        if not hasattr(real_object,'portal_type'):
+            break
+        if real_object.portal_type != "Student":
+            break
+        #import pdb;pdb.set_trace()
+        dep_id = real_object.study_course.getContent().department
+        res = self.portal_catalog(portal_type="Department",id=dep_id)
+        if len(res) != 1:
+            break
+        dynamic_roles = self.getRolesInContext(res[0].getObject())
+        for dr in self.getDynamicRoles():
+            if dr in dynamic_roles:
+                roles.append(dr)
+        break
+    return roles
+
+from Products.CPSUserFolder.CPSUserFolder import CPSUser
+CPSUser.getRolesInContext = getRolesInContext
Index: WAeUP_SRP/trunk/PatchCPSUserFolderUserFolderWithGroups.py
===================================================================
--- WAeUP_SRP/trunk/PatchCPSUserFolderUserFolderWithGroups.py	(revision 880)
+++ WAeUP_SRP/trunk/PatchCPSUserFolderUserFolderWithGroups.py	(revision 881)
@@ -19,4 +19,5 @@
     stop_loop = 0
     object = aq_inner(object)
+    import pdb; pdb.set_trace()
     while 1:
         # Collect all roles info
Index: WAeUP_SRP/trunk/__init__.py
===================================================================
--- WAeUP_SRP/trunk/__init__.py	(revision 880)
+++ WAeUP_SRP/trunk/__init__.py	(revision 881)
@@ -14,6 +14,7 @@
 import PatchCatalogToolXMLAdapter
 import PatchCPSSchemasAttributeStorageAdapter
+import PatchCPSUserFolderUserFolderWithGroups
+import PatchCPSUserFolderUserFolder
 import PatchBasicWidgetsCPSStringWidget
-import PatchCPSUserFolderUserFolderWithGroups
 # Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
 import PatchCPSDefaultImportExport
Index: WAeUP_SRP/trunk/exportimport.py
===================================================================
--- WAeUP_SRP/trunk/exportimport.py	(revision 880)
+++ WAeUP_SRP/trunk/exportimport.py	(revision 881)
@@ -74,5 +74,5 @@
     site = context.getSite()
     pm = site.portal_membership
-    pm.setLocalGroupRoles(site,['role:Authenticated',],'SectionReader')
+    #pm.setLocalGroupRoles(site,['group:ClearanceOfficers',],'SectionReader')
 
     importWAeUPTable(site.portal_accommodation, '', context,'accommodation')
Index: WAeUP_SRP/trunk/skins/waeup_student/co_search.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/co_search.py	(revision 880)
+++ 	(revision )
@@ -1,178 +1,0 @@
-## Script (Python) "co_search"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=REQUEST
-##title=
-##
-# $Id: $
-"""
-list Students for ClearanceOfficers
-"""
-request = REQUEST
-wftool = context.portal_workflow
-mtool = context.portal_membership
-member = mtool.getAuthenticatedMember()
-roles = member.getRolesInContext(context)
-try:
-    from Products.AdvancedQuery import Eq, Between, Le,In
-    evalAdvancedQuery = context.portal_catalog.evalAdvancedQuery
-except:
-    evalAdvancedQuery = None
-
-def cmp_id(a,b):
-    if a.getId() > b.getId():
-        return 1
-    return -1
-
-request = context.REQUEST
-form = request.form
-fget = form.get
-student_subobjects = ("StudentApplication",
-                      "StudentPersonal",
-                      "StudentStudyCourse",
-                      "StudentAccommodation",
-                      "StudentStudyLevel",)
-
-student_objects = student_subobjects + ("Student",)
-
-info = {}
-items = []
-wf = context.portal_workflow
-catalog = context.portal_catalog
-#student_wf_states = wf.waeup_student_wf.states.keys()
-#info['wf_states'] = student_wf_states
-#info['wf_states'][0] = " ----- "
-lt = context.portal_layouts
-pr = context.portal_registration
-path_info = request.get('PATH_INFO').split('/')
-is_manager = context.isManager
-validate = request.has_key("cpsdocument_edit_button")
-default = {'search_mode': 'name',
-        'review_state': 'clearance_requested',
-        'search_string': ''
-        }
-
-rend,psm,ds = lt.renderLayout(layout_id= 'student_search',
-                      schema_id= 'student_search',
-                      context=context,
-                      mapping=validate and request,
-                      ob=default,
-                      layout_mode='edit',
-                      formaction="co_search"
-                      )
-if psm == '':
-    return context.students_manager_view(rendered = rend,
-                             psm = psm,
-                             #psm = "%s, %s" % (psm,ds),
-                             students = items,
-                             is_manager = is_manager,
-                             )
-what = ds.get('search_mode')
-state = ds.get('review_state')
-st = term = ds.get('search_string')
-err = False
-with_review = state != "all"
-only_review = with_review and not term
-##with_level_results = state.startswith("category") or\
-##                     state in ('content_addable',) and\
-##                     evalAdvancedQuery is not None
-bools = "with_review = %s<br\> only_review = %s<br\>" % (with_review,only_review)
-if not term and not with_review:
-    psm = "You must specify a search string when searching 'all states'."
-    err = True
-elif '*' in term:
-    psm = "you cannot use the '*' alone"
-    err = True
-if err:
-    return context.students_manager_view(rendered = rend,
-                             psm = psm,
-                             #psm = "%s, %s" % (psm,ds),
-                             students = items,
-                             is_manager = is_manager,
-                             )
-items = []
-res = []
-portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']}
-st_queries = ('jamb_reg_no','matric_no','name')
-query_step = 0
-review_res = None
-query = None
-if len(term) > 0:
-    if what == "student_id":
-        query_step = 1
-        query = Eq('portal_type','Student') & Eq('id', term.strip())
-    elif what in st_queries:
-        if what == "jamb_reg_no":
-            query_step = 2
-            pt = ('StudentApplication',)
-            st = "%s" % term.strip().lower()
-        elif what == "matric_no":
-            query_step = 3
-            pt = ('StudentClearance',)
-            st = "%s" % term.strip().lower()
-        elif what == "name":
-            query_step = 4
-            pt = ('StudentPersonal')
-            st = "%s" % term.strip()
-        query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip())
-    res = evalAdvancedQuery(query)
-if with_review:
-    query_step += 10
-    review_res = evalAdvancedQuery(In('portal_type',student_objects) & Eq('review_state',state))
-search_set = []
-if res:
-    for r in res:
-        if r.portal_type in ("StudentStudyLevel",):
-            student = r.getObject().aq_parent.aq_parent
-        elif r.portal_type in student_subobjects:
-            student = r.getObject().aq_parent
-        else:
-            student = r.getObject()
-        search_set.append(student)
-review_set = []
-if review_res:
-    for r in review_res:
-        if r.portal_type in ("StudentStudyLevel",):
-            student = r.getObject().aq_parent.aq_parent
-        elif r.portal_type in student_subobjects:
-            student = r.getObject().aq_parent
-        else:
-            student = r.getObject()
-        review_set.append(student)
-all = []
-if only_review:
-    all = review_set
-elif with_review:
-    for i in search_set:
-        if i in review_set:
-            all.append(i)
-else:
-    all = search_set
-for a in all:
-    if a in items:
-        continue
-    items.append(a)
-students = []
-items.sort(cmp_id)
-if items:
-    for item in items:
-        info = context.getStudentInfo(item)
-        if context.isClearanceOfficer(info):
-            students.append(info)
-    return context.co_search_form(rendered = rend,
-                             psm = "%d,%d matching Students found QS = %s" %\
-                                    (len(review_set),len(search_set),query_step),
-                             #psm = "%d found QS = %s items: %s" % (len(items),query_step,items),
-                             students = students,
-                             is_manager = is_manager,
-                             )
-return context.co_search_form(rendered = rend,
-                             psm = """Step: %s found: %s Your search for "%s" in %s with state %s failed.<br\>%s""" % (query_step,len(items),st,what,state,bools),
-                             students = students,
-                             is_manager = is_manager,
-                             )
-
-
Index: WAeUP_SRP/trunk/skins/waeup_student/co_searchStudents.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/co_searchStudents.py	(revision 881)
+++ WAeUP_SRP/trunk/skins/waeup_student/co_searchStudents.py	(revision 881)
@@ -0,0 +1,180 @@
+## Script (Python) "co_searchStudents"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: $
+"""
+list Students for ClearanceOfficers
+"""
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+try:
+    from Products.AdvancedQuery import Eq, Between, Le,In
+    evalAdvancedQuery = context.portal_catalog.evalAdvancedQuery
+except:
+    evalAdvancedQuery = None
+
+def cmp_id(a,b):
+    if a.getId() > b.getId():
+        return 1
+    return -1
+
+request = context.REQUEST
+form = request.form
+fget = form.get
+student_subobjects = ("StudentApplication",
+                      "StudentPersonal",
+                      "StudentStudyCourse",
+                      "StudentAccommodation",
+                      "StudentStudyLevel",)
+
+student_objects = student_subobjects + ("Student",)
+
+info = {}
+items = []
+wf = context.portal_workflow
+catalog = context.portal_catalog
+#student_wf_states = wf.waeup_student_wf.states.keys()
+#info['wf_states'] = student_wf_states
+#info['wf_states'][0] = " ----- "
+lt = context.portal_layouts
+pr = context.portal_registration
+path_info = request.get('PATH_INFO').split('/')
+is_manager = context.isManager
+validate = request.has_key("cpsdocument_edit_button")
+default = {'search_mode': 'name',
+        'review_state': 'clearance_requested',
+        'search_string': ''
+        }
+
+rend,psm,ds = lt.renderLayout(layout_id= 'student_search',
+                      schema_id= 'student_search',
+                      context=context,
+                      mapping=validate and request,
+                      ob=default,
+                      layout_mode='edit',
+                      formaction="co_searchStudents"
+                      )
+if psm == '':
+    return context.students_manager_view(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             students = items,
+                             is_manager = is_manager,
+                             )
+what = ds.get('search_mode')
+state = ds.get('review_state')
+st = term = ds.get('search_string')
+err = False
+with_review = state != "all"
+only_review = with_review and not term
+##with_level_results = state.startswith("category") or\
+##                     state in ('content_addable',) and\
+##                     evalAdvancedQuery is not None
+bools = "with_review = %s<br\> only_review = %s<br\>" % (with_review,only_review)
+if not term and not with_review:
+    psm = "You must specify a search string when searching 'all states'."
+    err = True
+elif '*' in term:
+    psm = "you cannot use the '*' alone"
+    err = True
+if err:
+    return context.students_manager_view(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             students = items,
+                             is_manager = is_manager,
+                             )
+items = []
+res = []
+portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']}
+st_queries = ('jamb_reg_no','matric_no','name')
+query_step = 0
+review_res = None
+query = None
+if len(term) > 0:
+    if what == "student_id":
+        query_step = 1
+        query = Eq('portal_type','Student') & Eq('id', term.strip())
+    elif what in st_queries:
+        if what == "jamb_reg_no":
+            query_step = 2
+            pt = ('StudentApplication',)
+            st = "%s" % term.strip().lower()
+        elif what == "matric_no":
+            query_step = 3
+            pt = ('StudentClearance',)
+            st = "%s" % term.strip().lower()
+        elif what == "name":
+            query_step = 4
+            pt = ('StudentPersonal')
+            st = "%s" % term.strip()
+        query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip())
+    res = evalAdvancedQuery(query)
+if with_review:
+    query_step += 10
+    review_res = evalAdvancedQuery(In('portal_type',student_objects) & Eq('review_state',state))
+search_set = []
+if res:
+    for r in res:
+        if r.portal_type in ("StudentStudyLevel",):
+            student = r.getObject().aq_parent.aq_parent
+        elif r.portal_type in student_subobjects:
+            student = r.getObject().aq_parent
+        else:
+            student = r.getObject()
+        search_set.append(student)
+review_set = []
+if review_res:
+    for r in review_res:
+        if r.portal_type in ("StudentStudyLevel",):
+            student = r.getObject().aq_parent.aq_parent
+        elif r.portal_type in student_subobjects:
+            student = r.getObject().aq_parent
+        else:
+            student = r.getObject()
+        review_set.append(student)
+all = []
+if only_review:
+    all = review_set
+elif with_review:
+    for i in search_set:
+        if i in review_set:
+            all.append(i)
+else:
+    all = search_set
+for a in all:
+    if a in items:
+        continue
+    items.append(a)
+students = []
+items.sort(cmp_id)
+if items:
+    for item in items:
+        #if context.isClearanceOfficer(info):
+        droles = member.getRolesInContext(item)
+        if "ClearanceOfficer" in droles:
+            info = context.getStudentInfo(item)
+            students.append(info)
+    return context.co_search_view(rendered = rend,
+                             psm = "%d,%d matching Students found QS = %s" %\
+                                    (len(review_set),len(search_set),query_step),
+                             #psm = "%d found QS = %s items: %s" % (len(items),query_step,items),
+                             students = students,
+                             is_manager = is_manager,
+                             )
+return context.co_search_view(rendered = rend,
+                             psm = """Step: %s found: %s Your search for "%s" in %s with state %s failed.<br\>%s""" % (query_step,len(items),st,what,state,bools),
+                             students = students,
+                             is_manager = is_manager,
+                             )
+
+
Index: WAeUP_SRP/trunk/skins/waeup_student/co_search_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/co_search_form.pt	(revision 880)
+++ 	(revision )
@@ -1,113 +1,0 @@
-<metal:html tal:define="rendered options/rendered;
-            portal_status_message options/psm;
-            students options/students;
-            is_manager options/is_manager;"
-            >
-  <metal:body use-macro="here/main_template/macros/master">
-    <metal:block fill-slot="header"
-                 tal:define="creation creation|nothing;
-                 edition edition|nothing;
-                 metadata metadata|nothing"
-                 >
-    </metal:block>
-    
-    <metal:main fill-slot="main">
-      <span tal:condition="not: is_manager">
-        <metal:block use-macro="here/error_not_found/macros/not_found" />
-      </span>
-      <span tal:condition="is_manager"
-        tal:define="items students;
-        columns python:3;
-        items_per_page python:40;
-        max_items python:300;
-        zoom python:0;
-        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
-        batches python:batches_all[0];
-        batch_info python:batches_all[1];
-        zoomed python:batches_all[2];
-        mq nocall:modules/ZTUtils/make_query;"
-        tal:omit-tag=""
-        >
-      
-        <h3> Clearance Officer Search</h3>
-        
-        <br />
-      
-        <span tal:replace="structure rendered" />
-        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
-          <div class="batchLayout">
-            <span i18n:translate="">
-              Objects: 
-              <strong>
-                <tal:block replace="batch_info/start"
-                           i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
-                                                                   i18n:name="batch_limit" />
-              </strong>
-              of <tal:block replace="batch_info/length"
-                            i18n:name="batch_length" />
-            </span>
-          </div>
-          <br />
-        </tal:block>
-        <table class="contentListing" width="100%">
-          <span tal:repeat="rows batches" tal:omit-tag="">
-            <span tal:repeat="student rows">
-              <tr tal:condition="student" 
-                  tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
-                <td><a href="id" tal:attributes="href string:${student/student/absolute_url}"
-                       tal:content="student/id"></a></td>    
-                <td>
-                  <span tal:replace="python: student['per_doc'].firstname" />
-                  <span tal:replace="python: student['per_doc'].middlename" />
-                  <span tal:replace="python: student['per_doc'].lastname" />
-                </td>    
-                <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>    
-                <td><a href="id" 
-                       tal:attributes="href string:${student/student/clearance/absolute_url}"
-                       tal:content="student/review_state"></a></td>    
-                <td>
-              </tr>
-            </span>
-          </span>
-        </table>
-        <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
-          <div class="pageNavigationLayout">
-            <a tal:define="previous batch_info/previous"
-               tal:condition="python:previous is not None"
-               tal:attributes="href python:'%s?%s'%(request['URL'],
-               mq(request.form, b_start=0))"
-               >
-            (&lt;&lt;)</a>
-            <a tal:define="previous batch_info/previous"
-               tal:condition="python:previous is not None"
-               tal:attributes="href python:'%s?%s'%(request['URL'],
-               mq(request.form, b_start=previous))"
-               i18n:translate="batch_previous">Previous</a>
-            <tal:block repeat="page batch_info/pages">
-              <tal:block condition="python:page != batch_info['start'] - 1">
-                <a tal:attributes="href python:'%s?%s'%(request['URL'],
-                mq(request.form, b_start=page))"
-                tal:content="repeat/page/number">1</a>&nbsp;
-              </tal:block>
-              <tal:block condition="python:page == batch_info['start'] - 1">
-                <span tal:content="string:${repeat/page/number}" />&nbsp;
-              </tal:block>
-            </tal:block>
-            <a tal:define="next batch_info/next"
-               tal:condition="python:next is not None"
-               tal:attributes="href python:'%s?%s'%(request['URL'],
-               mq(request.form, b_start=next))"
-               i18n:translate="batch_next">Next</a>
-            <a tal:define="next batch_info/next;
-            last_page python:batch_info['pages'][-1]"
-            tal:condition="python:next is not None"
-            tal:attributes="href python:'%s?%s'%(request['URL'],
-            mq(request.form, b_start=last_page))"
-            >
-            (&gt;&gt;)</a>
-          </div>
-        </tal:block>
-      </span>
-    </metal:main>
-  </metal:body>
-</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/co_search_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/co_search_view.pt	(revision 881)
+++ WAeUP_SRP/trunk/skins/waeup_student/co_search_view.pt	(revision 881)
@@ -0,0 +1,113 @@
+<metal:html tal:define="rendered options/rendered;
+            portal_status_message options/psm;
+            students options/students;
+            is_manager options/is_manager;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header"
+                 tal:define="creation creation|nothing;
+                 edition edition|nothing;
+                 metadata metadata|nothing"
+                 >
+    </metal:block>
+    
+    <metal:main fill-slot="main">
+      <span tal:condition="not: is_manager">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <span tal:condition="is_manager"
+        tal:define="items students;
+        columns python:3;
+        items_per_page python:40;
+        max_items python:300;
+        zoom python:0;
+        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
+        batches python:batches_all[0];
+        batch_info python:batches_all[1];
+        zoomed python:batches_all[2];
+        mq nocall:modules/ZTUtils/make_query;"
+        tal:omit-tag=""
+        >
+      
+        <h3> Clearance Officer Search</h3>
+        
+        <br />
+      
+        <span tal:replace="structure rendered" />
+        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
+          <div class="batchLayout">
+            <span i18n:translate="">
+              Objects: 
+              <strong>
+                <tal:block replace="batch_info/start"
+                           i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
+                                                                   i18n:name="batch_limit" />
+              </strong>
+              of <tal:block replace="batch_info/length"
+                            i18n:name="batch_length" />
+            </span>
+          </div>
+          <br />
+        </tal:block>
+        <table class="contentListing" width="100%">
+          <span tal:repeat="rows batches" tal:omit-tag="">
+            <span tal:repeat="student rows">
+              <tr tal:condition="student" 
+                  tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
+                <td><a href="id" tal:attributes="href string:${student/student/absolute_url}"
+                       tal:content="student/id"></a></td>    
+                <td>
+                  <span tal:replace="python: student['per_doc'].firstname" />
+                  <span tal:replace="python: student['per_doc'].middlename" />
+                  <span tal:replace="python: student['per_doc'].lastname" />
+                </td>    
+                <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>    
+                <td><a href="id" 
+                       tal:attributes="href string:${student/student/clearance/absolute_url}"
+                       tal:content="student/review_state"></a></td>    
+                <td>
+              </tr>
+            </span>
+          </span>
+        </table>
+        <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+          <div class="pageNavigationLayout">
+            <a tal:define="previous batch_info/previous"
+               tal:condition="python:previous is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=0))"
+               >
+            (&lt;&lt;)</a>
+            <a tal:define="previous batch_info/previous"
+               tal:condition="python:previous is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=previous))"
+               i18n:translate="batch_previous">Previous</a>
+            <tal:block repeat="page batch_info/pages">
+              <tal:block condition="python:page != batch_info['start'] - 1">
+                <a tal:attributes="href python:'%s?%s'%(request['URL'],
+                mq(request.form, b_start=page))"
+                tal:content="repeat/page/number">1</a>&nbsp;
+              </tal:block>
+              <tal:block condition="python:page == batch_info['start'] - 1">
+                <span tal:content="string:${repeat/page/number}" />&nbsp;
+              </tal:block>
+            </tal:block>
+            <a tal:define="next batch_info/next"
+               tal:condition="python:next is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=next))"
+               i18n:translate="batch_next">Next</a>
+            <a tal:define="next batch_info/next;
+            last_page python:batch_info['pages'][-1]"
+            tal:condition="python:next is not None"
+            tal:attributes="href python:'%s?%s'%(request['URL'],
+            mq(request.form, b_start=last_page))"
+            >
+            (&gt;&gt;)</a>
+          </div>
+        </tal:block>
+      </span>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/students_index.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/students_index.py	(revision 880)
+++ WAeUP_SRP/trunk/skins/waeup_student/students_index.py	(revision 881)
@@ -24,5 +24,5 @@
 
 if "ClearanceOfficers" in member.getGroups():
-    return redirect("%s/co_search" % students_url)
+    return redirect("%s/co_searchStudents" % students_url)
 if context.isManager():
     return redirect("%s/searchStudents" % students_url)
