Index: /main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/__init__.py
===================================================================
--- /main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/__init__.py	(revision 18302)
+++ /main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/__init__.py	(revision 18302)
@@ -0,0 +1,1 @@
+# Make this a package.
Index: /main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/level_report.py
===================================================================
--- /main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/level_report.py	(revision 18302)
+++ /main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/level_report.py	(revision 18302)
@@ -0,0 +1,85 @@
+## $Id: level_report.py 16692 2021-11-02 13:03:05Z henrik $
+##
+## Copyright (C) 2013 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+
+import grok
+from zope.interface import implementer, Interface, Attribute
+from waeup.kofa.students.reports.level_report import (
+    LevelReport, LevelReportGenerator,
+    ILevelReport, LevelReportGeneratorPage,
+    LevelReportPDFView)
+
+
+# Level Report for graduating students only
+
+class IGradLevelReport(ILevelReport):
+    """Marker interface to distuingish graduating students level reports
+    from ordinary level reports.
+    """
+
+@implementer(IGradLevelReport)
+class GradLevelReport(LevelReport):
+    """
+    """
+
+    # title = 'Summary of Results'
+    title = 'Level Report (Graduating Students only)'
+
+    @property
+    def right_footer(self):
+        return self.title + ' (Graduating Students) - %s -' % self.session
+
+    def _excluded(self, level_obj):
+        # Do not list student if selecetd level is not final or an extension
+        if level_obj.level < level_obj.student['studycourse'].certificate.end_level:
+            return True
+        # Filter out students with extension levels higher than selected level
+        final_level = int(max(level_obj.student['studycourse'].keys()))
+        if final_level > level_obj.level:
+            return True
+        #if level_obj.remark not in (
+        #    'Pass', '3s_rd_s', '2s_2_s', '2s_1_s', '1s_st_s',
+        #    'Merit', 'Credit', 'Distinction'):
+        #    return True
+        #return False
+
+class GradLevelReportGenerator(LevelReportGenerator):
+
+    # title = 'Summary of Results (Graduating Students)'
+    title = 'Level Report  (Graduating Students only)'
+    grok.name('grad_level_report')
+
+    def generate(self, site, faccode=None, depcode=None, certcode=None,
+                 session=None, level=None, author=None):
+        result = GradLevelReport(faccode=faccode, depcode=depcode,
+            certcode=certcode, session=session, level=level, author=author)
+        return result
+
+class GradLevelReportGeneratorPage(LevelReportGeneratorPage):
+
+    grok.context(GradLevelReportGenerator)
+
+class GradLevelReportPDFView(LevelReportPDFView):
+
+    grok.context(IGradLevelReport)
+    grok.name('pdf')
+    grok.require('waeup.handleReports')
+
+    def _filename(self):
+        return 'GradLevelReport_rno%s_%s.pdf' % (
+            self.context.__name__,
+            self.context.creation_dt_string)
