Index: /WAeUP_SRP/trunk/skins/waeup_student/list_students.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/list_students.py	(revision 1667)
+++ /WAeUP_SRP/trunk/skins/waeup_student/list_students.py	(revision 1668)
@@ -12,4 +12,12 @@
 export student_list
 """
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from Products.AdvancedQuery import Eq, Between, Le,In,MatchRegexp
+aq_portal = context.portal_catalog.evalAdvancedQuery
+aq_students = context.students_catalog.evalAdvancedQuery
 request = context.REQUEST
 setheader = request.RESPONSE.setHeader
@@ -33,6 +41,19 @@
 lines.append(','.join(fields))
 format = '"%(' + ')s","%('.join(fields) + ')s"'
-cleared = context.portal_catalog(review_state = "cleared_and_validated")
+#cleared = context.portal_catalog(review_state = "cleared_and_validated")
+query = In('review_state',('cleared_and_validated',
+                           'school_fee_paid',
+                           'courses_registered',
+                           'courses_validated'))
+cleared = aq_portal(query)
+newquery = Eq('portal_type','StudentApplication') & MatchRegexp('SearchableText',r'^6*')
+#newquery = MatchRegexp('SearchableText','^5*')
+new_students = aq_portal(newquery)
+new_sids = []
+for ns in new_students:
+    new_sids.append(ns.getPath().split('/')[-2])
 for student in cleared:
+    if student.getId not in new_sids:
+        continue
     erg = scat(id=student.getId)
     if not erg:
