Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 10059)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 10060)
@@ -1072,4 +1072,28 @@
         return
 
+class RevertTransferFormPage(KofaEditFormPage):
+    """View that reverts the previous transfer.
+    """
+    grok.context(IStudent)
+    grok.name('revert_transfer')
+    grok.require('waeup.manageStudent')
+    grok.template('reverttransfer')
+    label = _('Revert previous transfer')
+
+    def update(self):
+        warning.need()
+        if not self.context.has_key('studycourse_1'):
+            self.flash(_('No previous transfer.'))
+            self.redirect(self.url(self.context))
+            return
+        return
+
+    @jsaction(_('Revert now'))
+    def transferStudent(self, **data):
+        self.context.revert_transfer()
+        self.flash(_('Previous transfer reverted.'))
+        self.redirect(self.url(self.context, 'studycourse'))
+        return
+
 class StudyLevelDisplayFormPage(KofaDisplayFormPage):
     """ Page to display student study levels
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/reverttransfer.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/reverttransfer.pt	(revision 10060)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/reverttransfer.pt	(revision 10060)
@@ -0,0 +1,16 @@
+<form action="." tal:attributes="action request/URL" method="post"
+      i18n:domain="waeup.kofa" enctype="multipart/form-data">
+
+    <p i18n:translate="">
+      Student transfers can be reverted one after the other. When reverting
+      a transfer, the active study course will be entirely removed including
+      all containing course lists (study levels)
+      and the previous study course will be reactivated.
+    </p>
+    <br />
+    <div tal:condition="view/availableActions">
+      <input tal:repeat="action view/actions"
+             tal:replace="structure action/render"
+             />
+    </div>
+</form>
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 10059)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 10060)
@@ -1750,4 +1750,16 @@
         self.assertTrue('The requested form is locked' in self.browser.contents)
 
+        # Revert transfer
+        self.browser.open(self.student_path + '/studycourse_1')
+        self.browser.getLink("Reactivate").click()
+        self.browser.getControl("Revert now").click()
+        self.assertTrue('Previous transfer reverted' in self.browser.contents)
+        results = list(
+            cat.searchResults(
+            certcode=('CERT1', 'CERT1')))
+        self.assertTrue(results[0] is self.student)
+        self.assertEqual([i for i in self.student.keys()],
+            [u'accommodation', u'payments', u'studycourse'])
+
     def test_login_as_student(self):
         # StudentImpersonators can login as student
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py	(revision 10059)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py	(revision 10060)
@@ -344,4 +344,19 @@
         return False
 
+class RevertTransferActionButton(ManageActionButton):
+    grok.order(1)
+    grok.context(IStudentStudyCourse)
+    grok.view(StudyCourseDisplayFormPage)
+    grok.require('waeup.manageStudent')
+    icon = 'actionicon_undo.png'
+    text = _('Reactivate this study course (revert previous transfer)')
+    target = 'revert_transfer'
+
+    @property
+    def target_url(self):
+        if self.context.is_previous:
+            return self.view.url(self.view.context.__parent__, self.target)
+        return False
+
 class StudyLevelManageActionButton(ManageActionButton):
     grok.order(1)
