Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py	(revision 12106)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py	(revision 12107)
@@ -154,8 +154,10 @@
         if self.context.is_postgrad:
             form_fields = grok.AutoFields(INigeriaPGStudentClearance).omit(
-            'clearance_locked', 'nysc_location', 'clr_code', 'officer_comment')
+            'clearance_locked', 'nysc_location', 'clr_code', 'officer_comment',
+            'date_of_invitation')
         else:
             form_fields = grok.AutoFields(INigeriaUGStudentClearance).omit(
-            'clearance_locked', 'clr_code', 'officer_comment')
+            'clearance_locked', 'clr_code', 'officer_comment',
+            'date_of_invitation')
         return form_fields
 
Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/export.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/export.py	(revision 12106)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/export.py	(revision 12107)
@@ -18,4 +18,6 @@
 """Exporters for student related stuff.
 """
+import grok
+from waeup.kofa.interfaces import REQUESTED
 from kofacustom.nigeria.students.interfaces import (
     INigeriaStudent,
@@ -31,4 +33,5 @@
     StudentPaymentsExporter)
 from waeup.kofa.utils.helpers import iface_names
+from kofacustom.nigeria.interfaces import MessageFactory as _
 
 class NigeriaStudentExporter(StudentExporter):
@@ -84,2 +87,26 @@
             omit=['display_item']))) + (
             'student_id','state','current_session')
+
+class ClearanceRequestedStudentExporter(StudentExporter):
+    """Exporter of data used to assign dates of invitation
+    """
+
+    grok.name('clearancerequested')
+
+    fields = ('student_id', 'reg_number', 'display_fullname',
+              'state', 'current_session', 'history', 'date_of_invitation')
+
+    title = _(u'Clearance Invitation Data')
+
+    def filter_func(self, x, **kw):
+        # We use this method to post-filter students in state
+        # 'clearance_requested'
+        return [student for student in x if student.state == REQUESTED]
+
+    def mangle_value(self, value, name, context=None):
+        if name == 'history':
+            # Only show last mesage
+            value = value.messages[-1]
+        return super(
+            StudentExporter, self).mangle_value(
+            value, name, context=context)
Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/interfaces.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/interfaces.py	(revision 12106)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/interfaces.py	(revision 12107)
@@ -68,4 +68,9 @@
         )
 
+    date_of_invitation= schema.TextLine(
+        title = _(u"Date of Invitation"),
+        required = False,
+        )
+
     clearance_locked = schema.Bool(
         title = _(u'Clearance form locked'),
Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_export.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_export.py	(revision 12106)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_export.py	(revision 12107)
@@ -48,5 +48,5 @@
         self.assertMatches(
             'adm_code,alr_date,alr_fname,alr_no,alr_results,clearance_locked,'
-            'clr_code,date_of_birth,def_adm,disabled,email,emp2_end,'
+            'clr_code,date_of_birth,date_of_invitation,def_adm,disabled,email,emp2_end,'
             'emp2_position,emp2_reason,emp2_start,emp_end,emp_position,'
             'emp_reason,emp_start,employer,employer2,firstname,former_matric,'
@@ -63,5 +63,5 @@
             'suspended,suspended_comment,password,state,history,certcode,is_postgrad,'
             'current_level,current_session\r\nmy adm code,,,,'
-            '"[(\'accounts\', \'A\')]",0,my clr code,1981-02-04#,,,'
+            '"[(\'accounts\', \'A\')]",0,my clr code,1981-02-04#,,,,'
             'anna@sample.com,,,,,,,,,,,Anna,,,,,"[(\'accounts\', \'A\')]"'
             ',,,,,,,,,,,,,,,,Tester,,,234,M.,NG,,,,,,,,,'
Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/utils.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/utils.py	(revision 12106)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/utils.py	(revision 12107)
@@ -65,2 +65,5 @@
         'form.former_matric': _(u'Former Student'),
         }
+
+    STUDENT_EXPORTER_NAMES = StudentsUtils().STUDENT_EXPORTER_NAMES + (
+            'clearancerequested',)
