Index: /main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/browser.py
===================================================================
--- /main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/browser.py	(revision 13330)
+++ /main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/browser.py	(revision 13331)
@@ -19,5 +19,6 @@
 from zope.i18n import translate
 from zope.formlib.textwidgets import BytesDisplayWidget
-from zope.component import getUtility
+from zope.component import getUtility, getMultiAdapter
+from zope.viewlet.interfaces import IViewletManager
 from waeup.kofa.interfaces import IKofaUtils
 from waeup.kofa.browser.layout import UtilityView
@@ -48,5 +49,5 @@
     NigeriaStudentBaseEditFormPage
     )
-
+from kofacustom.nigeria.students.viewlets import show_viewlet
 from waeup.kwarapoly.students.interfaces import (
     ICustomStudent,
@@ -188,15 +189,13 @@
 
     def dataNotComplete(self):
-        store = getUtility(IExtFileStore)
-        #if not store.getFileByContext(self.context, attr=u'birth_certificate.jpg'):
-        #    return _('No birth certificate uploaded.')
-        #if not store.getFileByContext(self.context, attr=u'ref_let.jpg'):
-        #    return _('No guarantor/referee letter uploaded.')
-        #if not store.getFileByContext(self.context, attr=u'acc_let.jpg'):
-        #    return _('No acceptance letter uploaded.')
-        #if not store.getFileByContext(self.context, attr=u'fst_sit_scan.jpg'):
-        #    return _('No first sitting result uploaded.')
-        if not store.getFileByContext(self.context, attr=u'stat_dec'):
-            return _('No affidavit of good conduct uploaded.')
+        mgr = getMultiAdapter(
+            (self.context, self.request, self), IViewletManager,'files')
+        mgr.update()
+        missing_files = []
+        for viewlet in mgr.viewlets:
+            if viewlet.show_viewlet and not viewlet.file_exists:
+                missing_files += (viewlet.label, )
+        if missing_files:
+            return "Missing: %s" % ', '.join(missing_files)
         return False
 
Index: /main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
===================================================================
--- /main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py	(revision 13330)
+++ /main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py	(revision 13331)
@@ -562,2 +562,45 @@
                         'W1000000 - ND/15/dep1/FT/001 assigned' in logcontent)
         return
+
+    def test_student_fileupload(self):
+        # Students can edit clearance data
+        IWorkflowState(self.student).setState('clearance started')
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.browser.getLink("Clearance Data").click()
+        self.browser.getLink("Edit").click()
+        self.browser.getControl("Save and request clearance").click()
+        self.assertMatches('...Required input is missing...',
+                           self.browser.contents)
+        self.student.nationality = u'DE'
+        self.browser.open(self.edit_clearance_path)
+        self.browser.getControl("Save and request clearance").click()
+        self.assertTrue(
+            'Missing: Birth Certificate, Acceptance Letter, LGA Identification, '
+            'First Sitting Result, Second Sitting Result, '
+            'Higher Qualification Result, Advanced Level Result, Certificate, '
+            'Evidence of Name, Result Statement, Guarantor/Referee Letter, '
+            'Affidavit of Good Conduct'
+            in self.browser.contents)
+        # Students can upload documents
+        ctrl = self.browser.getControl(name='birthcertificateupload')
+        file_obj = open(SAMPLE_IMAGE, 'rb')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(file_obj, filename='my_birth_certificate.jpg')
+        self.browser.getControl(
+            name='upload_birthcertificateupload').click()
+        self.assertTrue(
+            'href="http://localhost/app/students/W1000000/birth_certificate"'
+            in self.browser.contents)
+        # The list of missing files is now slightly shorter
+        self.browser.getControl("Save and request clearance").click()
+        self.assertTrue(
+            'Missing: Acceptance Letter, LGA Identification, '
+            'First Sitting Result, Second Sitting Result, '
+            'Higher Qualification Result, Advanced Level Result, Certificate, '
+            'Evidence of Name, Result Statement, Guarantor/Referee Letter, '
+            'Affidavit of Good Conduct'
+            in self.browser.contents)
+        return
