Index: main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py	(revision 14075)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py	(revision 14076)
@@ -54,5 +54,5 @@
 
 def get_courses_2(faccode, depcode, session, level):
-    """Method 2: Get all courses students of a certain
+    """Method 2 (not used): Get all courses students of a certain
     department have registered at a certain level.
     """
@@ -96,5 +96,5 @@
                     scores[ticket.code] = (ticket.score, ticket.grade)
                 else:
-                    scores[ticket.code] = ('N/A', '')
+                    scores[ticket.code] = ('0', '')
         line = (
                 stud.matric_number,
@@ -125,5 +125,5 @@
     def draw(self):
         canvas = self.canv
-        canvas.rotate(60)
+        canvas.rotate(25)
         canvas.drawString( 0, -1, self.text)
 
@@ -142,5 +142,5 @@
     for code in course_codes:
         course = list(catalog.searchResults(code=(code, code)))[0]
-        col_names += (TTR('%s - %s' % (code, course.title)),)
+        col_names += (TTR('%s (%s)' % (code, course.credits)),)
     table = [col_names]
     sn = 1
@@ -199,11 +199,19 @@
         self.creation_dt_string = self.creation_dt.astimezone(
             getUtility(IKofaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z")
-        self.course_codes = get_courses_2(faccode, depcode, session, level)
-        self.data = get_students(
-            faccode, depcode, session, level, self.course_codes)
+        self.past_levels = range(level, 0, -100)[:3]
+        self.course_codes = dict()
+        self.data = dict()
+        for level in self.past_levels:
+            course_codes = get_courses_1(faccode, depcode, session, level)
+            self.course_codes[level] = course_codes
+            self.data[level] = get_students(
+                faccode, depcode, session, self.levelcode, course_codes)
 
     def create_pdf(self):
         creator = getUtility(IPDFCreator, name='landscape')
-        table_data = tbl_data_to_table(self.data, self.course_codes)
+        table_data = dict()
+        for level in self.past_levels:
+            table_data[level] = tbl_data_to_table(
+                self.data[level], self.course_codes[level])
         col_widths = [1*cm, 4*cm, 5*cm] + [1*cm] * len(self.course_codes)
         pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
@@ -219,8 +227,14 @@
                     STYLE["Normal"]),
                     Spacer(1, 12),]
-        pdf_data += [
-            Table(table_data, style=TABLE_STYLE, colWidths=col_widths)]
+
+        for level in self.past_levels:
+            pdf_data.append(Spacer(1, 40))
+            pdf_data += [Paragraph('<b>Level %s Courses</b>' % level,
+                        STYLE["Normal"]), Spacer(1, 20),]
+            pdf_data += [
+                Table(table_data[level],
+                      style=TABLE_STYLE,
+                      colWidths=col_widths)]
         doc_title = translate(_('Raw Score Report'))
-
         pdf_data.append(Spacer(1, 40))
         signatures = [
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py	(revision 14075)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py	(revision 14076)
@@ -11,5 +11,5 @@
 from waeup.aaue.students.reports.raw_score_report import (
     get_students, RawScoreReport, IRawScoreReport,
-    get_courses_2 as get_courses)
+    get_courses_1 as get_courses)
 from waeup.aaue.testing import FunctionalLayer
 
@@ -49,5 +49,5 @@
 
     def test_create_pdf(self):
-        report = RawScoreReport('fac1', 'dep1', 2010, 100)
+        report = RawScoreReport('fac1', 'dep1', 2010, 200)
         result = report.create_pdf()
         self.assertTrue(result.startswith('%PDF-'))
