Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 15940)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 15941)
@@ -4,4 +4,6 @@
 1.6.1.dev0 (unreleased)
 =======================
+
+* Copy also files from applicants to students section.
 
 * Reset _curr_stud_id if student could not be created.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 15940)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 15941)
@@ -40,5 +40,5 @@
 from waeup.kofa.utils.helpers import attrs_to_fields
 from waeup.kofa.applicants.interfaces import (
-    IApplicant, IApplicantEdit, ISpecialApplicant)
+    IApplicant, IApplicantEdit, ISpecialApplicant, IApplicantsUtils)
 from waeup.kofa.applicants.workflow import application_states_dict
 from waeup.kofa.applicants.payment import ApplicantOnlinePayment
@@ -153,6 +153,6 @@
 
     def createStudent(self, view=None):
-        """Create a student, fill with base data, create an application slip
-        and copy applicant data.
+        """Create a student, fill with base data, create an application slip,
+        copy applicant data and files.
         """
         site = grok.getSite()
@@ -218,4 +218,5 @@
         self._setStudyCourseAttributes(student['studycourse'])
         self._copyPassportImage(student)
+        self._copyFiles(student)
         # Update the catalog
         notify(grok.ObjectModifiedEvent(student))
@@ -247,4 +248,19 @@
         return
 
+    def _copyFiles(self, student):
+        """Copy all other files over to student location. Not
+        used in base package but tested with fake file.
+        """
+        file_store = getUtility(IExtFileStore)
+        filenames = getUtility(IApplicantsUtils).FILENAMES
+        for filename in filenames:
+            appl_file = file_store.getFileByContext(self, attr=filename)
+            if appl_file is None:
+                return
+            stud_file_id = IFileStoreNameChooser(student).chooseName(
+                attr=filename)
+            file_store.createFile(stud_file_id, appl_file)
+        return
+
 # Set all attributes of Applicant required in IApplicant as field
 # properties. Doing this, we do not have to set initial attributes
@@ -345,5 +361,5 @@
         In the beginning the `attr` parameter was not taken into account for
         :class:`Applicant` context as the single passport image was the
-        only file we store for applicants. Meanwhile FUTMinna requires
+        only file we store for applicants. Meanwhile many universities require
         uploads of other documents too. Now we store passport image
         files without attribute but all other documents with.
@@ -439,4 +455,7 @@
     file_store = getUtility(IExtFileStore)
     file_store.deleteFileByContext(applicant)
+    # Remove all other files too
+
+
     # Remove global role
     role_manager = IPrincipalRoleManager(grok.getSite())
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py	(revision 15940)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py	(revision 15941)
@@ -21,4 +21,5 @@
 import os
 import grok
+from StringIO import StringIO
 from datetime import datetime
 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
@@ -59,8 +60,16 @@
         self.prepare_applicant()
         storage = getUtility(IExtFileStore)
+        # The stored image can be fetched
         file_id = IFileStoreNameChooser(self.applicant).chooseName()
-        # The stored image can be fetched
         fd = storage.getFile(file_id)
         file_len_orig = len(fd.read())
+        # We store a test pdf file
+        dummy_file = StringIO('test file')
+        testfile_id = IFileStoreNameChooser(
+            self.applicant).chooseName(attr='testfile.pdf')
+        test_file = storage.createFile(testfile_id, dummy_file)
+        # The stored file can be fetched
+        fd = storage.getFile(testfile_id)
+        testfile_len_orig = len(fd.read())
         self.assertEqual(self.app['students']._curr_stud_id, 1000000)
         # Let's try to create the student
@@ -111,10 +120,13 @@
         self.assertEqual(self.applicant.student_id, student.student_id)
         # Check if passport image has been copied
-        storage = getUtility(IExtFileStore)
-        file_id = IFileStoreNameChooser(
-            student).chooseName(attr='passport.jpg')
+        file_id = IFileStoreNameChooser(student).chooseName(attr='passport.jpg')
         fd = storage.getFile(file_id)
         file_len = len(fd.read())
         self.assertEqual(file_len_orig, file_len)
+        # Check if test file has been copied too (new)
+        file_id = IFileStoreNameChooser(student).chooseName(attr='testfile.jpg')
+        fd = storage.getFile(file_id)
+        file_len = len(fd.read())
+        self.assertEqual(testfile_len_orig, file_len)
         # Check if application slip exists and is a PDF file
         file_id = IFileStoreNameChooser(
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py	(revision 15940)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py	(revision 15941)
@@ -47,4 +47,8 @@
       'form.notice': _(u'Application Process Data'),
       }
+
+    #: A tuple of names of files to be copied over
+    #: to students section.
+    FILENAMES = ('testfile.pdf',)
 
     def setPaymentDetails(self, container, payment, applicant):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 15940)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 15941)
@@ -2174,5 +2174,5 @@
 
     This view is used for browser tests only and
-    must be neutralized in custom pages!
+    must be neutralized on custom pages!
     """
     grok.name('fake_approve')
