Index: /main/waeup.kofa/trunk/docs/source/userdocs/datacenter.rst
===================================================================
--- /main/waeup.kofa/trunk/docs/source/userdocs/datacenter.rst	(revision 12860)
+++ /main/waeup.kofa/trunk/docs/source/userdocs/datacenter.rst	(revision 12861)
@@ -28,5 +28,11 @@
 Regular data exporters (1) collect objects from specific containers, (2) iterate over the collected objects, (3) extract and mangle information from each object, (4) write the information of each object into a row of a CSV file and (5) finally provide the file for download. The CSV file is neither stored in the database nor archived in the filesystem. (3) and (4) means a flattening of the hierarchical data structure, i.e. a mapping of objects to flat relational data to be stored in a CSV table. The extracted information must not necessarily be based only on static attributes of the collected object. The data, finally stored in the CSV file, can also be derived from parent or child objects, or dynamically computed by the object's methods and property attributes. These methods and properties can retrieve information from everywhere in the portal's database.
 
-In the following we list all exporter classes including two attributes and a method description. The `fields` attribute contain the column titles of the export file. These are not necessarily only attributes of the exported objects. The `title` attribute unveils the name of the exporter under which this exporter will be displayed in the user interface. The `mangle_value()` method shows how some of fields are being dynamically computed.
+In the following we list all exporter classes including two attributes and a method description. The `fields` attribute contain the column titles of the export file. These are not necessarily only attributes of the exported objects.
+
+.. note::
+
+  The list of exported columns usually underlies heavy customizations. In the Kofa base package only very fiew columns are being exported. In some Kofa custom packages tons of data are being gathered from applicants and students and the number of columns increase accordingly.
+
+The `title` attribute unveils the name of the exporter under which this exporter will be displayed in the user interface. The `mangle_value()` method shows how some of fields are being dynamically computed.
 
 Regular Exporters
@@ -77,17 +83,4 @@
 
 
-.. autoclass:: waeup.kofa.applicants.export.ApplicantsContainerExporter()
-  :noindex:
-
-  .. autoattribute:: waeup.kofa.applicants.export.ApplicantsContainerExporter.fields
-  .. autoattribute:: waeup.kofa.applicants.export.ApplicantsContainerExporter.title
-
-.. autoclass:: waeup.kofa.applicants.export.ApplicantExporter()
-  :noindex:
-
-  .. autoattribute:: waeup.kofa.applicants.export.ApplicantExporter.fields
-  .. autoattribute:: waeup.kofa.applicants.export.ApplicantExporter.title
-  .. automethod:: waeup.kofa.applicants.export.ApplicantExporter.mangle_value()
-
 .. autoclass:: waeup.kofa.accesscodes.export.AccessCodeBatchExporter()
   :noindex:
@@ -115,8 +108,54 @@
   .. autoattribute:: waeup.kofa.hostels.export.BedExporter.title
 
+Application Data Exporters
+--------------------------
+
+.. autoclass:: waeup.kofa.applicants.export.ApplicantsContainerExporter()
+  :noindex:
+
+  .. autoattribute:: waeup.kofa.applicants.export.ApplicantsContainerExporter.fields
+  .. autoattribute:: waeup.kofa.applicants.export.ApplicantsContainerExporter.title
+
+.. autoclass:: waeup.kofa.applicants.export.ApplicantExporter()
+  :noindex:
+
+  .. autoattribute:: waeup.kofa.applicants.export.ApplicantExporter.fields
+  .. autoattribute:: waeup.kofa.applicants.export.ApplicantExporter.title
+  .. automethod:: waeup.kofa.applicants.export.ApplicantExporter.mangle_value()
 
 Student Data Exporters
 ----------------------
 
+When starting a Student Data Exporter in the Data Center all student records will be taken into consideration, no matter what or where a student is studying. The exporter can also be started 'locally' at various levels in the academic section. Starting one of the exporters e.g. at faculty or department level means that only the data of students are exported who study in this faculty or department respectively. The exporter can also be started at certificate level. Then only the data of students, who are studying the named study course, will be taken into account. At course level the data of those students are being exported who have attended or taken this specific course.
+
+Student Data Exporter can be further configured through a configuration page. Search parameters like the student's current level, current session and current study mode  can be set to filter sets of students in order to decrease the size of the export file. The set of filter parameters varies and depends on the 'locatation' from where the exporter is called. A completely different set of filter parameters is provided for courses. In this case the session and level can be selected when the course was taken by the student.
+
+.. autoclass:: waeup.kofa.students.export.StudentExporter()
+  :noindex:
+
+  .. autoattribute:: waeup.kofa.students.export.StudentExporter.fields
+  .. autoattribute:: waeup.kofa.students.export.StudentExporter.title
+  .. automethod:: waeup.kofa.students.export.StudentExporter.mangle_value()
+
+.. autoclass:: waeup.kofa.students.export.StudentStudyCourseExporter()
+  :noindex:
+
+  .. autoattribute:: waeup.kofa.students.export.StudentStudyCourseExporter.fields
+  .. autoattribute:: waeup.kofa.students.export.StudentStudyCourseExporter.title
+  .. automethod:: waeup.kofa.students.export.StudentStudyCourseExporter.mangle_value()
+
+.. autoclass:: waeup.kofa.students.export.StudentStudyLevelExporter()
+  :noindex:
+
+  .. autoattribute:: waeup.kofa.students.export.StudentStudyLevelExporter.fields
+  .. autoattribute:: waeup.kofa.students.export.StudentStudyLevelExporter.title
+  .. automethod:: waeup.kofa.students.export.StudentStudyLevelExporter.mangle_value()
+
+.. autoclass:: waeup.kofa.students.export.CourseTicketExporter()
+  :noindex:
+
+  .. autoattribute:: waeup.kofa.students.export.CourseTicketExporter.fields
+  .. autoattribute:: waeup.kofa.students.export.CourseTicketExporter.title
+  .. automethod:: waeup.kofa.students.export.CourseTicketExporter.mangle_value()
 
 Data Import
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 12860)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 12861)
@@ -64,8 +64,15 @@
 
 class ApplicantExporter(grok.GlobalUtility, ExporterBase):
-    """The Applicant Exporter exports all application records (= applicants)
+    """The Applicant Exporter exports application records (= applicants)
     stored in the database. In contrast to the exporters in the academics
     section this exporter does not iterate over the items of containers
-    but searches the Applicants Catalog instead.
+    but searches the :class:`ApplicantsCatalog` instead.
+
+    The exporter exports all applicants if started in the Data Center
+    which means in the context of the `DataCenter` object. The exporter can also 
+    be started 'locally' which means in the context of an `ApplicantsContainer`
+    container. Then the :meth:`export_filtered()` instead of the 
+    :meth:`export_all()` method is applied which searches for applicants
+    in the respective container.
     """
     grok.implements(ICSVExporter)
@@ -98,5 +105,4 @@
     def export(self, applicants, filepath=None):
         """Export `applicants`, an iterable, as CSV file.
-
         If `filepath` is ``None``, a raw string with CSV data is returned.
         """
@@ -107,6 +113,5 @@
 
     def export_all(self, site, filepath=None):
-        """Export applicants into filepath as CSV data.
-
+        """Export all applicants into filepath as CSV data.
         If `filepath` is ``None``, a raw string with CSV data is returned.
         """
@@ -122,6 +127,5 @@
 
     def export_filtered(self, site, filepath=None, **kw):
-        """Export applicants in container.
-
+        """Export filtered applicants in container denoted by keywords (`kw`).
         If `filepath` is ``None``, a raw string with CSV data should
         be returned.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 12860)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 12861)
@@ -56,5 +56,4 @@
 def get_tickets(students, **kw):
     """Get course tickets of `students`.
-
     If code is passed through, filter course tickets
     which belong to this course code and meets level
@@ -89,5 +88,4 @@
 def get_payments(students, paid=False, **kw):
     """Get all payments of `students` within given payment_date period.
-
     """
     date_format = '%d/%m/%Y'
@@ -146,5 +144,4 @@
 class StudentExporterBase(ExporterBase):
     """Exporter for students or related objects.
-
     This is a baseclass.
     """
@@ -158,5 +155,4 @@
     def get_filtered(self, site, **kw):
         """Get students from a catalog filtered by keywords.
-
         students_catalog is the default catalog. The keys must be valid
         catalog index names.
@@ -192,5 +188,4 @@
     def get_selected(self, site, selected):
         """Get set of selected students.
-
         Returns a simple empty list or a list with `Student`
         objects.
@@ -206,5 +201,4 @@
     def export(self, values, filepath=None):
         """Export `values`, an iterable, as CSV file.
-
         If `filepath` is ``None``, a raw string with CSV data is returned.
         """
@@ -216,5 +210,4 @@
     def export_all(self, site, filepath=None):
         """Export students into filepath as CSV data.
-
         If `filepath` is ``None``, a raw string with CSV data is returned.
         """
@@ -226,5 +219,4 @@
     def export_filtered(self, site, filepath=None, **kw):
         """Export items denoted by `kw`.
-
         If `filepath` is ``None``, a raw string with CSV data should
         be returned.
@@ -242,17 +234,18 @@
 
 class StudentExporter(grok.GlobalUtility, StudentExporterBase):
-    """Exporter for Students.
+    """The Student Exporter first filters the set of students by searching the
+    students catalog. Then it exports student base data of this set of students.
     """
     grok.name('students')
 
-    #: Fieldnames considered by this exporter
     fields = tuple(sorted(iface_names(IStudent))) + (
         'password', 'state', 'history', 'certcode', 'is_postgrad',
         'current_level', 'current_session')
-
-    #: The title under which this exporter will be displayed
     title = _(u'Students')
 
     def mangle_value(self, value, name, context=None):
+        """The mangler prepares the history messages and adds a hash symbol at
+        the end of the phone number to avoid annoying automatic number
+        transformation by Excel or Calc."""
         if name == 'history':
             value = value.messages
@@ -267,12 +260,12 @@
 
 class StudentStudyCourseExporter(grok.GlobalUtility, StudentExporterBase):
-    """Exporter for StudentStudyCourses.
+    """The Student Study Course Exporter first filters the set of students
+    by searching the students catalog. Then it exports the data of the current
+    study course container of each student from this set. It does
+    not export their content.
     """
     grok.name('studentstudycourses')
 
-    #: Fieldnames considered by this exporter
     fields = tuple(sorted(iface_names(IStudentStudyCourse))) + ('student_id',)
-
-    #: The title under which this exporter will be displayed
     title = _(u'Student Study Courses')
 
@@ -281,5 +274,5 @@
 
     def mangle_value(self, value, name, context=None):
-        """Treat location values special.
+        """The mangler determines the certificate code and the student id.
         """
         if name == 'certificate' and value is not None:
@@ -295,14 +288,15 @@
 
 class StudentStudyLevelExporter(grok.GlobalUtility, StudentExporterBase):
-    """Exporter for StudentStudyLevels.
+    """The Student Study Level Exporter first filters the set of students
+    by searching the students catalog. Then it exports the data of the student's
+    study level containers but not their content (course tickets).
+    The exporter iterates over all objects in the students' ``studycourse``
+    containers.
     """
     grok.name('studentstudylevels')
 
-    #: Fieldnames considered by this exporter
     fields = tuple(sorted(iface_names(
         IStudentStudyLevel) + ['level'])) + (
         'student_id', 'number_of_tickets','certcode')
-
-    #: The title under which this exporter will be displayed
     title = _(u'Student Study Levels')
 
@@ -311,5 +305,5 @@
 
     def mangle_value(self, value, name, context=None):
-        """Treat location values special.
+        """The mangler determines the student id, nothing else.
         """
         if name == 'student_id' and context is not None:
@@ -321,14 +315,22 @@
 
 class CourseTicketExporter(grok.GlobalUtility, StudentExporterBase):
-    """Exporter for CourseTickets.
+    """The Course Ticket  Exporter exports course tickets. Usually,
+    the exporter first filters the set of students by searching the
+    students catalog. Then it collects and iterates over all ``studylevel``
+    containers of the filtered student set and finally
+    iterates over all items inside these containers.
+
+    If the course code is passed through, the exporter uses a different
+    catalog. It searches for students in the course tickets catalog and
+    exports those course tickets which belong to the given course code and
+    also meet level and level_session passed through at the same time.
+    This happens if the exporter is called at course level in the academics
+    section.
     """
     grok.name('coursetickets')
 
-    #: Fieldnames considered by this exporter
     fields = tuple(sorted(iface_names(ICourseTicket) +
         ['level', 'code', 'level_session'])) + ('student_id',
         'certcode', 'display_fullname')
-
-    #: The title under which this exporter will be displayed
     title = _(u'Course Tickets')
 
@@ -337,5 +339,5 @@
 
     def mangle_value(self, value, name, context=None):
-        """Treat location values special.
+        """The mangler determines the student's id and fullname.
         """
         if context is not None:
@@ -343,8 +345,4 @@
             if name in ('student_id', 'display_fullname') and student is not None:
                 value = getattr(student, name, None)
-            #if name == 'level':
-            #    value = getattr(context, 'level', lambda: None)
-            #if name == 'level_session':
-            #    value = getattr(context, 'level_session', lambda: None)
         return super(
             CourseTicketExporter, self).mangle_value(
Index: /main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py	(revision 12860)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py	(revision 12861)
@@ -493,5 +493,4 @@
     def close_outfile(self, filepath, outfile):
         """Close outfile.
-
         If filepath is None, the contents of outfile is returned.
         """
@@ -504,5 +503,4 @@
     def get_filtered(self, site, **kw):
         """Get datasets to export filtered by keyword arguments.
-
         Returns an iterable.
         """
@@ -512,5 +510,4 @@
         """Get datasets to export for selected items
         specified by a list of identifiers.
-
         Returns an iterable.
         """
@@ -519,5 +516,4 @@
     def export(self, iterable, filepath=None):
         """Export `iterable` as CSV file.
-
         If `filepath` is ``None``, a raw string with CSV data should
         be returned.
@@ -528,5 +524,4 @@
         """Export all appropriate objects in `site` into `filepath` as
         CSV data.
-
         If `filepath` is ``None``, a raw string with CSV data should
         be returned.
@@ -535,6 +530,5 @@
 
     def export_filtered(self, site, filepath=None, **kw):
-        """Export items denoted by `args` and `kw`.
-
+        """Export items denoted by `kw`.
         If `filepath` is ``None``, a raw string with CSV data should
         be returned.
@@ -546,5 +540,4 @@
         """Export those items specified by a list of identifiers
         called `selected`.
-
         If `filepath` is ``None``, a raw string with CSV data should
         be returned.
