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 12897)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py	(revision 12898)
@@ -81,5 +81,4 @@
 from waeup.kofa.reports import Report
 from waeup.kofa.browser.interfaces import IPDFCreator
-from waeup.kofa.university.vocabularies import course_levels
 
 STYLE = getSampleStyleSheet()
@@ -148,6 +147,9 @@
             args=[faccode, depcode, session, level], kwargs={'author':author})
         site = grok.getSite()
+        self.studylevelsource = StudyLevelSource().factory
+        self.portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
         self.session = academic_sessions_vocab.getTerm(session).title
-        self.level = course_levels.getTerm(level).title
+        self.level = translate(self.studylevelsource.getTitle(None, int(level)),
+            'waeup.kofa', target_language=self.portal_language)
         self.levelcode = level
         self.sessioncode = session
@@ -170,6 +172,11 @@
                               STYLE["Normal"]),
                     Spacer(1, 12),]
-        pdf_data += [Paragraph('%s<br />%s<br />Level: %s<br />Session: %s' % (
-                    self.factitle, self.deptitle, self.level, self.session),
+        pdf_data += [Paragraph(
+                    translate(
+                        '${a}<br />${b}<br />Level: ${c}<br />Session: ${d}',
+                        mapping = {'a':self.factitle,
+                                   'b':self.deptitle,
+                                   'c':self.level,
+                                   'd':self.session, }),
                     STYLE["Normal"]),
                     Spacer(1, 12),]
@@ -179,5 +186,7 @@
 
         pdf_data.append(Spacer(1, 40))
-        signatures = ['Ag. Head of Department', 'Dean of Faculty']
+        signatures = [
+            translate(_('Ag. Head of Department')),
+            translate(_('Dean of Faculty'))]
         signaturetables = get_signature_tables(signatures, landscape=True)
         pdf_data.append(signaturetables[0])
@@ -239,7 +248,7 @@
             container = self.context.__parent__
             user_id = self.request.principal.id
-            if level is not None:
+            if level:
                 level = int(level)
-            if session is not None:
+            if session:
                 session = int(session)
             kw = dict(
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 12897)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py	(revision 12898)
@@ -17,4 +17,5 @@
 ##
 import grok
+from zope.i18n import translate
 from zope.catalog.interfaces import ICatalog
 from zope.component import queryUtility, getUtility
@@ -23,4 +24,5 @@
     IKofaUtils,
     academic_sessions_vocab, registration_states_vocab)
+from waeup.kofa.students.vocabularies import StudyLevelSource
 from waeup.kofa.students.interfaces import IStudentsUtils
 from waeup.kofa.interfaces import MessageFactory as _
@@ -60,5 +62,5 @@
                 stud.display_fullname,
                 )
-        if level is not None:
+        if level != 0:
             if not stud['studycourse'].has_key(str(level)):
                 continue
@@ -76,5 +78,5 @@
                 continue
             if itemcount > 1:
-                # Error: more than one session registered in this session
+                # Error: more than one level registered in this session
                 table[len(students_utils.gpa_boundaries)].append(line)
                 continue
@@ -95,5 +97,4 @@
 from waeup.kofa.reports import Report
 from waeup.kofa.browser.interfaces import IPDFCreator
-from waeup.kofa.university.vocabularies import course_levels
 
 STYLE = getSampleStyleSheet()
@@ -121,9 +122,12 @@
             args=[faccode, depcode, session, level], kwargs={'author':author})
         site = grok.getSite()
+        self.studylevelsource = StudyLevelSource().factory
+        self.portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
         self.session = academic_sessions_vocab.getTerm(session).title
-        if level == None:
-            self.level = 'All levels'
+        if level == 0:
+            self.level = translate(_('all levels'))
         else:
-            self.level = course_levels.getTerm(level).title
+            self.level = translate(self.studylevelsource.getTitle(None, int(level)),
+                'waeup.kofa', target_language=self.portal_language)
         self.levelcode = level
         self.sessioncode = session
@@ -181,5 +185,5 @@
 class SessionResultsPresentationGenerator(grok.GlobalUtility):
 
-    title = _('Session Results Presentation')
+    title = 'Session Results Presentation'
     grok.name('session_results_presentation')
 
@@ -208,13 +212,21 @@
     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
+
     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])
+        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
+        studylevelsource = StudyLevelSource().factory
+        self.levels = [(u'All levels', 0)]
+        for code in studylevelsource.getValues(None):
+            title = translate(studylevelsource.getTitle(None, code),
+                'waeup.kofa', target_language=portal_language)
+            self.levels.append((title, code))
         return
 
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 12897)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py	(revision 12898)
@@ -12,5 +12,5 @@
 from waeup.kofa.tests.test_async import FunctionalAsyncTestCase
 from waeup.kofa.browser.tests.test_pdf import samples_dir
-from waeup.kofa.students.studylevel import StudentStudyLevel
+from waeup.kofa.students.studylevel import StudentStudyLevel, CourseTicket
 
 class SessionResultsPresentationTests(CatalogTestSetup):
@@ -32,5 +32,5 @@
 
     def test_get_students_at_all_levels(self):
-        result = get_students('fac1', 'dep1', 2010)
+        result = get_students('fac1', 'dep1', 2010, 0)
         self.assertEqual(result,
             [[], [], [], [], [], [(u'K1000000', u'1234', u'Bob Tester')], []])
@@ -43,5 +43,5 @@
         studylevel.level_session = 2010
         self.student['studycourse']['200'] = studylevel
-        result = get_students('fac1', 'dep1', 2010)
+        result = get_students('fac1', 'dep1', 2010, 0)
         self.assertEqual(result,
             [[], [], [], [], [], [], [(u'K1000000', u'1234', u'Bob Tester')]])
@@ -50,5 +50,5 @@
     def test_get_students_without_scores(self):
         self.student['studycourse']['100']['Course1'].score = None
-        result = get_students('fac1', 'dep1', 2010)
+        result = get_students('fac1', 'dep1', 2010, 0)
         self.assertEqual(result,
             [[], [], [], [], [], [], [(u'K1000000', u'1234', u'Bob Tester')]])
@@ -70,6 +70,24 @@
         return
 
+    def test_create_pdf_620(self):
+        studylevel = StudentStudyLevel()
+        studylevel.level = 620
+        studylevel.level_session = 2013
+        ticket = CourseTicket()
+        ticket.code = 'Course2'
+        ticket.credits = 40
+        ticket.score = 44
+        self.student['studycourse']['620'] = studylevel
+        self.student['studycourse']['620']['Course2'] = ticket
+        report = SessionResultsPresentation('fac1', 'dep1', 2013, 620)
+        result = report.create_pdf()
+        self.assertTrue(result.startswith('%PDF-'))
+        path = os.path.join(samples_dir(), 'session_results_presentation_620.pdf')
+        open(path, 'wb').write(result)
+        print "Sample session_results_presentation_620.pdf written to %s" % path
+        return
+
     def test_create_pdf_with_two_levels_in_session(self):
-        # Register second level in the same session (which shouldn't be!)
+        # Register second level with tickets in the same session (which shouldn't be!)
         # Check the pdf file if the student record has really been classified
         # as erroneous.
@@ -77,6 +95,11 @@
         studylevel.level = 200
         studylevel.level_session = 2010
+        ticket = CourseTicket()
+        ticket.code = 'Course2'
+        ticket.credits = 40
+        ticket.score = 11
         self.student['studycourse']['200'] = studylevel
-        report = SessionResultsPresentation('fac1', 'dep1', 2010, None)
+        self.student['studycourse']['200']['Course2'] = ticket
+        report = SessionResultsPresentation('fac1', 'dep1', 2010, 0)
         result = report.create_pdf()
         self.assertTrue(result.startswith('%PDF-'))
@@ -160,5 +183,5 @@
     def test_report_download_all_levels(self):
         # We can download a generated report for all levels
-        self.trigger_report_creation(level='all')
+        self.trigger_report_creation(level='0')
         # When the job is finished and we reload the page...
         job_id = self.wait_for_report_job_completed()
@@ -169,5 +192,5 @@
                          'application/pdf')
         self.assertTrue(
-            'filename="SessionResultsPresentation_fac1_dep1_2010_None_' in
+            'filename="SessionResultsPresentation_fac1_dep1_2010_0_' in
             self.browser.headers['content-disposition'])
         self.assertEqual(len(self.app['reports'].running_report_jobs), 1)
@@ -183,10 +206,10 @@
         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)'
+            'report %s created: Session Results Presentation (faculty=fac1, department=dep1, session=2010, level=0)'
             % job_id in logcontent
             )
         self.assertTrue(
             'INFO - zope.mgr - students.reports.session_results_presentation.SessionResultsPresentationPDFView - '
-            'report %s downloaded: SessionResultsPresentation_fac1_dep1_2010_None_'
+            'report %s downloaded: SessionResultsPresentation_fac1_dep1_2010_0_'
             % job_id in logcontent
             )
