Index: /WAeUP_SRP/trunk/skins/waeup_student/list_students.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/list_students.py	(revision 1312)
+++ /WAeUP_SRP/trunk/skins/waeup_student/list_students.py	(revision 1312)
@@ -0,0 +1,50 @@
+## Script (Python) "hall_allocation_list"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+export student_list
+"""
+request = context.REQUEST
+setheader = request.RESPONSE.setHeader
+pa = context.portal_accommodation
+scat = context.students_catalog
+st_schema = context.students_catalog.schema()
+#fields = list(st_schema) + ["bed",]
+fields = ("id",
+          "name",
+          "matric_no",
+          "jamb_reg_no",
+          "sex",
+          "email",
+          "faculty",
+          "department",
+          "course",
+          "level",
+          )
+res_list = []
+lines = []
+lines.append(','.join(fields))
+format = '"%(' + ')s","%('.join(fields) + ')s"'
+cleared = context.portal_catalog(review_state = "cleared_and_validated")
+for student in cleared:
+    erg = scat(id=student.getId)
+    if not erg:
+        continue
+    d = context.getFormattedStudentEntry(erg[0])
+    lines.append(format % d)
+#setheader('Content-type', 'text/x-cvs')
+#setheader('Content-type','application/vnd.ms-excel')
+setheader('Content-type','text/semicolon-seperated-values')
+setheader('Content-Disposition:', 'attachment; filename="cleared_students.csv"')
+setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+setheader('Cache-Control', 'post-check=0,pre-check=0')
+setheader('Pragma', 'no-cache') # HTTP/1.0
+return '\n'.join(lines)
Index: /WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 1311)
+++ /WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 1312)
@@ -21,4 +21,7 @@
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <a href="statistics_ret_view"><strong>Returning Student Statistics</strong></a>
+        <br />
+        <a href="list_students"><strong>Cleared Students Export</strong></a>
+      
         <h3> Search Student Section</h3><br />
           You are logged in as member <span tal:replace="info/member|nothing" /> 
