Index: /WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py	(revision 588)
+++ /WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py	(revision 589)
@@ -12,4 +12,5 @@
 return Info about the current Student
 """
+#from Products.ZCTextIndex.QueryParser import ParseError,QueryError
 request = context.REQUEST
 form = request.form
@@ -55,7 +56,14 @@
 if state == " ----- ":
     state = ''
+err = False
 if not term and what in ('student_edit','jamb_id','name','matric_no'):
+    psm = "You must specify a search string"
+    err = True
+elif '*' in term:
+    psm = "You cannot use '*'"
+    err = True
+if err: 
     return context.students_manager_view(rendered = rend,
-                             psm = "You must specify a search string",
+                             psm = psm,
                              #psm = "%s, %s" % (psm,ds),
                              students = items,
@@ -66,4 +74,5 @@
 res = []
 portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']}
+st_queries = ('jamb_id','matric_no','name')
 if onlyreview:
     res = catalog(portal_type=portal_type_query,
@@ -72,20 +81,32 @@
     res = catalog(portal_type='Student',
                   id = term.strip())
-elif what == "jamb_id":
-    res = catalog(portal_type='StudentApplication',
-                  SearchableText="%s*" % term.strip().lower())
-elif what == "matric_no":
-    res = catalog(portal_type='StudentClearance',
-                  SearchableText="%s*" % term.strip().lower())
-elif what == "name":
-    res = catalog(portal_type=portal_type_query,
-                  SearchableText="%s*" % term.strip())
+elif what in st_queries: 
+    if what == "jamb_id":
+        pt = 'StudentApplication'
+        st = "%s*" % term.strip().lower()
+    elif what == "matric_no":
+        pt = 'StudentClearance'
+        st = "%s*" % term.strip().lower()
+    elif what == "name":
+        pt = portal_type_query
+        st = "%s*" % term.strip()
+    try:
+        res = catalog(portal_type=pt,SearchableText=st,)
+    except:
+        return context.students_manager_view(rendered = rend,
+                             psm = 'Searchstring "%s" not allowed' % term,
+                             #psm = "%s, %s" % (psm,ds),
+                             students = items,
+                             is_manager = is_manager,
+                             )
+            
 if res:
     for r in res:
-        row = {}
         if r.portal_type in ("StudentApplication","StudentPersonal"):
-            items.append(r.getObject().aq_parent)
+            student = r.getObject().aq_parent
         else:
-            items.append(r.getObject())
+            student = r.getObject()
+        if student not in items:
+            items.append(student)
 students = []
 if items:
