Index: WAeUP_SRP/trunk/skins/waeup_pins/search_pins.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_pins/search_pins.py	(revision 1002)
+++ WAeUP_SRP/trunk/skins/waeup_pins/search_pins.py	(revision 1006)
@@ -12,4 +12,5 @@
 list Students for ClearanceOfficers
 """
+
 request = REQUEST
 wftool = context.portal_workflow
@@ -47,6 +48,6 @@
 
 if what == 'student':
-    items_2 = context.portal_pins(student = term)
     items_1 = context.portal_pins(student = term.upper())
+    items_2 = context.portal_pins(student = term.lower())
     items = items_1 + items_2
 elif what == 'pin':
@@ -55,4 +56,6 @@
     items = []
 l = []
+students_url = "%s/%s" % (context.portal_url(),'students')
+pins = []
 for i in items:
     item = {}
@@ -61,17 +64,22 @@
     item['serial'] = i.serial
     item['pin'] = i.pin
+    if i.pin in pins:
+        continue
+    pins.append(i.pins)
     if len(sno)==10:
-    #if bd.prefix == "APP":
         #res = context.portal_catalog(SearchableText=sno,portal_type='StudentApplication')
         res = context.students_catalog(jamb_reg_no=sno.upper())
         if len(res) > 0:
-            item['student_url'] = "%s/%s" % (context.portal_url(),res[0].id)
+            item['student_url'] = "%s/campus/students/%s" % (context.portal_url(),res[0].id)
             item['student_id'] = res[0].id
         else:
             item['student_url'] = None
             item['student_id'] = ''
+    elif sno:
+        item['student_url'] = '%s/campus/students/%s' % (students_url,item['student'])
+        item['student_id'] = student
     else:
-        item['student_url'] = '%s/%s' % (students_url,item['student'])
-        item['student_id'] = student
+        item['student_url'] = ''
+        item['student_id'] = "not used"
     l.append(item)
     
