Index: main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 17766)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 17769)
@@ -306,5 +306,8 @@
         try:
             newcourse.certificate = certificate
-            newcourse.entry_mode = 'transfer'
+            # After import with entry_mode 'transfer' 
+            # we must ensure that after export and reimport
+            # the student is not transferred again.
+            newcourse.entry_mode = 'transferred'
             newcourse.current_session = current_session
             newcourse.current_level = current_level
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 17766)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 17769)
@@ -569,8 +569,21 @@
             'entry_mode,entry_session,previous_verdict,student_id,previous\r\n'
             )
-        error = self.student.transfer(self.certificate2, current_session=2013)
+        exporter = SecondStudentStudyCourseExporter()
+        exporter.export_all(self.app, self.outfile)
+        result = open(self.outfile, 'rb').read()
+        self.assertEqual(
+            result,
+            'certificate,current_level,current_session,current_verdict,'
+            'entry_mode,entry_session,previous_verdict,student_id,previous\r\n'
+            )
+
+        # First Transfer
+        error = self.student.transfer(self.certificate2,
+                                      current_session=2013)
         self.assertTrue(error == None)
-        exporter.export_all(self.app, self.outfile)
-        result = open(self.outfile, 'rb').read()
+        exporter = FirstStudentStudyCourseExporter()
+        exporter.export_all(self.app, self.outfile)
+        result = open(self.outfile, 'rb').read()
+        # This is the original study course
         self.assertEqual(
             result,
@@ -578,17 +591,29 @@
             'entry_mode,entry_session,previous_verdict,student_id,previous\r\n'
             'CERT1,200,2012,0,ug_ft,2010,0,A111111,1\r\n')
+        exporter = SecondStudentStudyCourseExporter()
+        exporter.export_all(self.app, self.outfile)
+        result = open(self.outfile, 'rb').read()
+        self.assertEqual(
+            result,
+            'certificate,current_level,current_session,current_verdict,'
+            'entry_mode,entry_session,previous_verdict,student_id,previous\r\n'
+            )
+
+        # Second transfer
         error = self.student.transfer(self.certificate,
                                       current_session=2014,
                                       current_level=300)
         self.assertTrue(error == None)
-        exporter = SecondStudentStudyCourseExporter()
-        exporter.export_all(self.app, self.outfile)
-        result = open(self.outfile, 'rb').read()
+        exporter = FirstStudentStudyCourseExporter()
+        exporter.export_all(self.app, self.outfile)
+        result = open(self.outfile, 'rb').read()
+        # This is the original study course
         self.assertEqual(
             result,
             'certificate,current_level,current_session,current_verdict,'
             'entry_mode,entry_session,previous_verdict,student_id,previous\r\n'
-            'CERT2,,2013,,transfer,2010,,A111111,2\r\n')
-        exporter = StudentStudyCourseExporter()
+            'CERT1,200,2012,0,ug_ft,2010,0,A111111,1\r\n')
+        # This is the second study course
+        exporter = SecondStudentStudyCourseExporter()
         exporter.export_all(self.app, self.outfile)
         result = open(self.outfile, 'rb').read()
@@ -597,5 +622,14 @@
             'certificate,current_level,current_session,current_verdict,'
             'entry_mode,entry_session,previous_verdict,student_id,previous\r\n'
-            'CERT1,300,2014,,transfer,2010,,A111111,0\r\n')
+            'CERT2,,2013,,transferred,2010,,A111111,2\r\n')
+        # This is the third study course
+        exporter = StudentStudyCourseExporter()
+        exporter.export_all(self.app, self.outfile)
+        result = open(self.outfile, 'rb').read()
+        self.assertEqual(
+            result,
+            'certificate,current_level,current_session,current_verdict,'
+            'entry_mode,entry_session,previous_verdict,student_id,previous\r\n'
+            'CERT1,300,2014,,transferred,2010,,A111111,0\r\n')
         return
 
