Index: main/waeup.kofa/trunk/docs/source/userdocs/students/browser.rst
===================================================================
--- main/waeup.kofa/trunk/docs/source/userdocs/students/browser.rst	(revision 13027)
+++ main/waeup.kofa/trunk/docs/source/userdocs/students/browser.rst	(revision 13028)
@@ -4,5 +4,8 @@
 ============================
 
-The reader may ask: How do officers and students browse the portal? Where are the step-by-step operating instructions on how to use Kofa? We are always tempted to answer: The menu navigation should be self-explanatory and it's quite easy to follow the menu prompts. For the students section this answer seems a bit over the top. We must indeed describe some browser pages and what their clickable actions are doing with the data. The reason is, that a lot of Kofa's functionality is embedded in view and utility methods and not only provided by the functionality of content components as described above.
+The reader may ask: How do officers and students browse the portal? Where are the step-by-step operating instructions on how to use Kofa? We are always tempted to answer: The menu navigation should be self-explanatory and it's quite easy to follow the menu prompts or flash messages which appear above page titles in a green, yellow or red box. For the students section this answer seems a bit over the top. We must indeed describe some browser pages and what their clickable actions are doing with the data. The reason is, that a lot of Kofa's functionality is embedded in view and utility methods and not only provided by the functionality of content components as described above.
+
+
+.. _page_layout:
 
 Page Layout
@@ -13,4 +16,7 @@
 Officers see a double-column theme after logging in. The left column contains a box which contains links to the user's preferences (My Preferences) and roles (My Roles). It also contains links to the various sections of Kofa depending on the permissions the officer has has obtained. Possible sections are: 'Portal Configuration', 'Officers', 'Data Center', 'Reports' and 'Access Codes'. A second box shows up in the left column when the officer accesses a student record. This box gives direct access to the display pages of a student record.
 
+
+.. _manage_edit_pages:
+
 Manage and Edit Pages
 =====================
@@ -20,7 +26,10 @@
 .. note::
 
-  Briefly, Zope Formlib is wedded to `Zope Schema`_, it provides display and input widgets (= views) for the fields defined in the Zope Schema package. Auto-generation is done with `grok.AutoFields` which takes the fields declared in an interface and renders display or input widgets according to the schema declaration for display or edit forms respectively.
+  Briefly, Zope Formlib is wedded to `Zope Schema`_, it provides display and input widgets (= views) for the fields defined in the Zope Schema package. Auto-generation is done with `grok.AutoFields` which takes the fields, declared in an interface, and renders display or input widgets, according to the schema declaration, for display or edit forms respectively.
 
 Whereas display and add form pages are usually shared by officers and students, edit form pages are not. Students are not allowed to edit all of their data all the time. Edit access is restricted by workflow states or other conditions. Officers' access is much less restricted and we therefore speak of 'managing' instead of 'editing' data. In most cases, Kofa uses two different form pages which require different permissions: An `EditFormPage` requires the :py:class:`HandleStudent<waeup.kofa.students.permissions.HandleStudent>` permission and a `ManageFormPage` requires the :py:class:`ManageStudent<waeup.kofa.students.permissions.ManageStudent>` permission.
+
+
+.. _action_buttons:
 
 Action Buttons
@@ -42,14 +51,53 @@
    another Kofa page.
 
+
+.. _logging_in_as_student:
+
 Logging in as Student
 =====================
 
-Officers with :py:class:`LoginAsStudent<waeup.kofa.students.permissions.LoginAsStudent>` permission do see a 'Login as student' button on student display pages, which redirects to a page where a temporary student password can be set by clicking a 'Set password now' form button. The temporary password is valid for 10 minutes. During this period the student can't login. The officer is being redirected to a login page which allows to directly login as student with pre-filled temporary credentials. The second page is to avoid that officers must remember the student credentials, logout from their own account and manually login as student via the regular login page. After 10 minutes the officer is automatically thrown out and the student is able to login again (if the officer hasn't changed the password). Attention: When logging in as student, the officer really impersonates the student. All actions are logged with the student id and not with the officer's user id. However, start of student impersonation is also logged, so that officers can be identified and fraudulent use can be discovered.
+Officers with :py:class:`LoginAsStudent<waeup.kofa.students.permissions.LoginAsStudent>` permission do see a 'Login as student' button on student display pages which redirects to a page, where a temporary student password can be set by clicking a 'Set password now' form button. The temporary password is valid for 10 minutes. During this period the student can't login. The officer is being redirected to a login page which allows to directly login as student with pre-filled temporary credentials. The second page is to avoid that officers must remember the student credentials, have to logout from their own account and manually login as student via the regular login page. After 10 minutes the officer is automatically thrown out and the student is able to login again (if the officer hasn't changed the password). Attention: When logging in as student, the officer really impersonates the student. All actions are logged with the student id and not with the officer's user id. However, start of student impersonation is also logged, so that officers can be identified and fraudulent use can be discovered.
+
+
+.. _rejecting_clearance:
 
 Rejecting Clearance
 ===================
 
+When a clearance officer clicks the 'Save comment and reject clearance now' button, the `reject` action method of the :py:class:`StudentRejectClearancePage<waeup.kofa.students.browser.StudentRejectClearancePage>` is called. This method first checks, in which workflow state the student is, and fires a transition accordingly. Then the comment, which should explain why the request was requested, is saved twice in the `officer_comment` attribute of the student and in ``students.log``. As soon as the `clear` transition (d) is effected, an event handler clears the attribute again. The logfile message is permanent and ensures that the original cause of rejection can always be reconstructed.
+
+Finally, the method redirects to the ContactStudentForm and prefills the HTML form with the comment previously saved. The clearance officer can leave the comment as it is, or can modify the text to give more information about the reason of rejection. This comment will then be sent to the student by email. This comnent is not saved, neither in the student object nor in the logfile.
+
+.. important::
+
+  All messages sent via Kofa contact forms are private. They are neither stored in the database nor in any logfile. The emails are also not forwarded to any other email address. Thus senders and recipients can be sure that nobody else is eavesdropping and the correspondence is kept secret.
+
+
+.. _transferring_students:
+
 Transferring Students
 =====================
+
+Transferring a student means switching the study course of a student.
+
+The simple but dirty way is to select another certificate and adjust study course attributes accordingly. Existing study levels can be either removed or, in case registered courses can be credited, left as they are. This simple way is tedious and also dangerous, because the changes are not tracable. Only the logfile does tell us, that an officer has edited the student's data. The data of the previous study course are not backed up. They are lost.
+
+Kofa provides a more adequate, cleaner and tracable way of transferring students. It can make a backup of the entire study course container and create a new and empty container for the new study programme with only one click or even by batch processing.
+
+After clicking the 'Transfer student' button the `StudentTransferFormPage` opens and asks for the new certificate, current session, current level and current verdict. After submitting this form, the student transfer method checks if the old study course is complete and ready for transfer. It also checks if the number of possible transfers is not exceeded. Kofa allows only two (2) transfers! Finally the copying process is started and history and logfile messages are added.
+
+The old study course container(s) can still be accessed via links on the current study course display page. But, they can neither be edited, removed, exported or reimported.
+
+Batch Transferring Students
+---------------------------
+
+Sometimes students of an entire study programme have to be transferred to another programme. This can be done with the :py:class:`StudentStudyCourseProcessor<waeup.kofa.students.batching.StudentStudyCourseProcessor>`. The import file must contain the following columns: `student_id` (or any other locator), `certificate`, `current_session`, `current_level` and `entry_mode`. Do not import `entry_session`. A transfer is automatically initialized if the `entry_mode` value is ``transfer``.
+
+Reverting a Transfer
+--------------------
+
+Previous transfers can be reverted by opening the previous study course and clicking the 'Reactivate this study course (revert previous transfer)' button. This is a complete rollback of the last transfer. The current study mode will be irrevocably deleted and replaced by the previous study course. The second last study course will become the previous study course.
+
+.. _adding_payment_tickets:
 
 Adding Payment Tickets
Index: main/waeup.kofa/trunk/docs/source/userdocs/students/interfaces.rst
===================================================================
--- main/waeup.kofa/trunk/docs/source/userdocs/students/interfaces.rst	(revision 13027)
+++ main/waeup.kofa/trunk/docs/source/userdocs/students/interfaces.rst	(revision 13028)
@@ -6,5 +6,5 @@
 The `Student` class is a container class which means, there are not
 only attributes describing the student entity but also content. Each
-student container contains exactly three subcontainers:
+student container contains three subcontainers:
 ``studycourse`` (instance of `StudentStudyCourse`), ``payments``
 (instance of `StudentPaymentsContainer`) and ``accommodation``
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 13027)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 13028)
@@ -756,5 +756,6 @@
 
     def update(self):
-        cdm = getUtility(IStudentsUtils).clearance_disabled_message(self.context)
+        cdm = getUtility(IStudentsUtils).clearance_disabled_message(
+            self.context)
         if cdm:
             self.flash(cdm)
@@ -773,5 +774,5 @@
 
 class StudentRejectClearancePage(KofaEditFormPage):
-    """ Reject clearance by clearance officers
+    """ Reject clearance by clearance officers.
     """
     grok.context(IStudent)
@@ -783,5 +784,6 @@
 
     def update(self):
-        cdm = getUtility(IStudentsUtils).clearance_disabled_message(self.context)
+        cdm = getUtility(IStudentsUtils).clearance_disabled_message(
+            self.context)
         if cdm:
             self.flash(cdm, type="warning")
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 13027)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 13028)
@@ -239,5 +239,4 @@
         current_level=None, current_verdict=None, previous_verdict=None):
         """ Creates a new studycourse and backups the old one.
-
         """
         newcourse = createObject(u'waeup.StudentStudyCourse')
@@ -267,5 +266,7 @@
         self.__parent__.logger.info(
             '%s - transferred from %s to %s' % (
-            self.student_id, oldcourse.certificate.code, newcourse.certificate.code))
+            self.student_id,
+            oldcourse.certificate.code,
+            newcourse.certificate.code))
         history = IObjectHistory(self)
         history.addMessage('Transferred from %s to %s' % (
