Index: WAeUP_SRP/base/skins/waeup_student/search_students.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/search_students.py	(revision 3022)
+++ WAeUP_SRP/base/skins/waeup_student/search_students.py	(revision 3023)
@@ -55,5 +55,4 @@
                       "StudentStudyLevel",)
 
-#student_objects = student_subobjects + ("Student",)
 student_objects = ("Student",)
 
@@ -201,17 +200,12 @@
                              students = [],
                              allowed = allowed,
+                             info = user_info,
                              )
     elif what == "department":
         query = Eq('department', term.strip())
         logger.info('%s searches for student in department %s' % (member,term))
-        # res = context.students_catalog(department=term.strip())
-        # logger.info('%s searches for student in department %s' % (member,term))
-        # search_set = [r.id for r in res]
     elif what == "matric_no":
         query = Eq('matric_no', term.strip())
         logger.info('%s searches for student with matric_no %s' % (member,term))
-        # res = context.students_catalog(matric_no=term.strip())
-        # logger.info('%s searches for student with matric_no %s' % (member,term))
-        # search_set = [r.id for r in res]
     elif what == "jamb_reg_no":
         st_l = "%s" % term.strip().lower()
@@ -219,38 +213,20 @@
         query = In('jamb_reg_no',(st_l,st_u))
         logger.info('%s searches for student with jamb_reg_no %s' % (member,term))
-        # res = aq_students(In('jamb_reg_no',(st_l,st_u)))
-        # logger.info('%s searches for student with jamb_reg_no %s' % (member,term))
-        # search_set = [r.id for r in res]
     elif what == "name":
         if len(term) < 4:
             return context.search_students_form(rendered = rend,
-                                                psm = "Name too short!",
+                                                psm = "Search string is too short!",
                                                 students = [],
+                                                info = user_info,
                                                 allowed = allowed,
                                                )
-        # pt = ('StudentPersonal')
-        # query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip())
-        # logger.info('%s searches for student with name %s' % (member,term))
-        # res = aq_portal(query)
-        # if res:
-        #     for r in res:
-        #         pl = r.getPath().split('/')
-        #         search_set.append(pl[pl.index('students') + 1])
         query = Eq('name',"%s*" % term.strip())
         logger.info('%s searches for student with name %s' % (member,term))
-        # res = aq_students(query)
-        # if res:
-        #     for r in res:
-        #         search_set += r.id,
 
 if only_review or with_review or co_view:
-    #query = Eq('review_state',state)
-    #review_res = aq_portal(query)
-    #review_res = context.portal_catalog(review_state = state)
     if query is not None:
         query = Eq('review_state',state) & query
     else:
         query = Eq('review_state',state)
-    #review_res = aq_students(query)
     logger.info('%s searches for students in review_state %s' % (member,state))
 
@@ -262,6 +238,4 @@
     else:
         query = In('faculty',faculties) | In('department',departments)
-    # res = aq_students(query)
-    # search_set.extend([r.id for r in res])
 elif ca_view:
     only_review = False
@@ -271,46 +245,4 @@
     if query is not None:
         query = query & In('course',courses) & In('level',levels)
-    # res = aq_students(query)
-    # search_set.extend([r.id for r in res])
-
-# if review_res:
-    # review_set = [r.id for r in review_res]
-
-# if only_review:
-    # all = review_set
-# elif with_review:
-    # all = []
-    # for i in search_set:
-    #     if i in review_set:
-    #         all.append(i)
-# else:
-    # all = search_set
-    
-# res = aq_students(query)
-# all = [r.id for r in res]
-
-# items = all[:500]
-# students = []
-# if items:
-#     for item in items:
-#         students_catalog = context.students_catalog
-#         record = students_catalog(id = item)
-#         if record:
-#             record = record[0]
-#         else:
-#             return item+' not found in students_catalog'
-#         info = {}
-#         for field in students_catalog.schema() + students_catalog.indexes():
-#             info[field] = getattr(record, field)
-#         else:
-#             students.append(info)
-#     return context.search_students_form(rendered = rend,
-#                              psm = "",
-#                              info = user_info,
-#                              students = students,
-#                              allowed = allowed,
-#                              co_view = co_view,
-#                              ca_view = ca_view
-#                              )
 student_records = aq_students(query)
 students = []
