Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py	(revision 10578)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py	(revision 10579)
@@ -220,7 +220,11 @@
             container = self.context.__parent__
             user_id = self.request.principal.id
+            if level is not None:
+                level = int(level)
+            if session is not None:
+                session = int(session)
             kw = dict(
-                session=int(session),
-                level=int(level),
+                session=session,
+                level=level,
                 faccode=faccode,
                 depcode=depcode)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py	(revision 10578)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py	(revision 10579)
@@ -67,5 +67,4 @@
                 continue
         else:
-            # XXX: Not yet supported by by generator page
             itemcount = 0
             for item in stud['studycourse'].values():
@@ -118,5 +117,8 @@
         site = grok.getSite()
         self.session = academic_sessions_vocab.getTerm(session).title
-        self.level = course_levels.getTerm(level).title
+        if level == None:
+            self.level = 'All levels'
+        else:
+            self.level = course_levels.getTerm(level).title
         self.levelcode = level
         self.sessioncode = session
@@ -153,5 +155,4 @@
             gpa_class += 1
 
-        # XXX: Not yet supported by by generator page
         if self.data[-1]:
             pdf_data.append(Spacer(1, 20))
@@ -202,4 +203,17 @@
     label = _('Create session results presentation')
 
+    def update(self, CREATE=None, faccode_depcode=None,
+               session=None, level=None):
+        if level == 'all':
+            level = None
+        super(SessionResultsPresentationGeneratorPage, self).update(
+            CREATE, faccode_depcode ,session, level)
+
+    def _set_level_values(self):
+        vocab_terms = course_levels.by_value.values()
+        self.levels = [('All levels', 'all')] + sorted(
+            [(x.title, x.token) for x in vocab_terms])
+        return
+
 class SessionResultsPresentationPDFView(StudentStatisticsReportPDFView):
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py	(revision 10578)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py	(revision 10579)
@@ -83,5 +83,5 @@
         return False
 
-    def trigger_report_creation(self):
+    def trigger_report_creation(self, level='100'):
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open('http://localhost/app/reports')
@@ -90,5 +90,5 @@
         self.browser.getControl(name="generator").value = ['session_results_presentation']
         self.browser.getControl("Configure").click()
-        self.browser.getControl(name="level").value = ['100']
+        self.browser.getControl(name="level").value = [level]
         self.browser.getControl(name="session").value = ['2010']
         self.browser.getControl(name="faccode_depcode").value = ['fac1_dep1']
@@ -133,3 +133,44 @@
             'report %s discarded' % job_id in logcontent
             )
+
         return
+
+    def test_report_download_all_levels(self):
+        # We can download a generated report for all levels
+        self.trigger_report_creation(level='all')
+        # When the job is finished and we reload the page...
+        job_id = self.wait_for_report_job_completed()
+        self.browser.open('http://localhost/app/reports')
+        # ... the pdf file can be downloaded ...
+        self.browser.getControl("Download").click()
+        self.assertEqual(self.browser.headers['content-type'],
+                         'application/pdf')
+        self.assertTrue(
+            'filename="SessionResultsPresentation_fac1_dep1_2010_None_' in
+            self.browser.headers['content-disposition'])
+        self.assertEqual(len(self.app['reports'].running_report_jobs), 1)
+        job_id = self.app['reports'].running_report_jobs[0][0]
+        # ... and discarded
+        self.browser.open('http://localhost/app/reports')
+        self.browser.getControl("Discard").click()
+        self.assertEqual(len(self.app['reports'].running_report_jobs), 0)
+        # Creation, downloading and discarding is logged
+        logfile = os.path.join(
+            self.app['datacenter'].storage, 'logs', 'main.log')
+        logcontent = open(logfile).read()
+        self.assertTrue(
+            'INFO - zope.mgr - students.reports.session_results_presentation.SessionResultsPresentationGeneratorPage - '
+            'report %s created: Session Results Presentation (faculty=fac1, department=dep1, session=2010, level=None)'
+            % job_id in logcontent
+            )
+        self.assertTrue(
+            'INFO - zope.mgr - students.reports.session_results_presentation.SessionResultsPresentationPDFView - '
+            'report %s downloaded: SessionResultsPresentation_fac1_dep1_2010_None_'
+            % job_id in logcontent
+            )
+        self.assertTrue(
+            'INFO - zope.mgr - browser.reports.ReportsContainerPage - '
+            'report %s discarded' % job_id in logcontent
+            )
+
+        return
