Index: main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py
===================================================================
--- main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py	(revision 18323)
+++ main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py	(revision 18325)
@@ -314,4 +314,20 @@
         'validation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
 
+    @property
+    def show_results(self):
+        isStudent = getattr(
+            self.request.principal, 'user_type', None) == 'student'
+        try:
+            show_results = grok.getSite()[
+                'configuration'][str(self.context.level_session)].show_results
+        except KeyError:
+            return False
+        if isStudent and self.context.student.current_mode not in show_results:
+            return False
+        #if isStudent and self.context.student.state != RETURNING \
+        #    and self.context.student.current_level == self.context.level:
+        #    return False
+        return True
+
 class CustomStudyLevelManageFormPage(StudyLevelManageFormPage):
     """ Page to edit the student study level data
@@ -338,4 +354,20 @@
         'adm_code', 'sex', 'suspended_comment', 'current_level',
         'flash_notice', 'imported_gpa', 'imported_cgpa',)
+
+    @property
+    def show_results(self):
+        isStudent = getattr(
+            self.request.principal, 'user_type', None) == 'student'
+        try:
+            show_results = grok.getSite()[
+                'configuration'][str(self.context.level_session)].show_results
+        except KeyError:
+            return False
+        if isStudent and self.context.student.current_mode not in show_results:
+            return False
+        if isStudent and self.context.student.state != RETURNING \
+            and self.context.student.current_level == self.context.level:
+            return False
+        return True
 
     def _signatures(self):
@@ -375,13 +407,21 @@
                  if value.semester == i and not value.outstanding],
                  key=lambda value: str(value.semester) + value.code))
-            tableheader.append([(Code,'code', 2.0),
-                               (Title,'title', 7),
-                               (Cred, 'credits', 1.4),
-                               #(CC, 'course_category', 1.2),
-                               (TotalScore, 'total_score', 1.4),
-                               #(CA, 'ca', 1.4),
-                               (Grade, 'grade', 1.4),
-                               (Signature, 'dummy', 3),
-                               ])
+            if self.show_results:
+                tableheader.append([(Code,'code', 2.0),
+                                   (Title,'title', 7),
+                                   (Cred, 'credits', 1.4),
+                                   (CC, 'course_category', 1.2),
+                                   (TotalScore, 'total_score', 1.4),
+                                   #(CA, 'ca', 1.4),
+                                   (Grade, 'grade', 1.4),
+                                   (Signature, 'dummy', 3),
+                                   ])
+            else:
+                tableheader.append([(Code,'code', 2.0),
+                                   (Title,'title', 7),
+                                   (Cred, 'credits', 1.5),
+                                   (CC, 'course_category', 1.2),
+                                   (Signature, 'dummy', 3),
+                                   ])
         return students_utils.renderPDF(
             self, 'course_registration_slip.pdf',
@@ -399,7 +439,19 @@
 
     @property
+    def show_results(self):
+        isStudent = getattr(
+            self.request.principal, 'user_type', None) == 'student'
+        if isStudent:
+            return False
+        return True
+
+    @property
     def form_fields(self):
-        return grok.AutoFields(ICustomCourseTicket).omit('course_category',
+        if self.show_results:
+            return grok.AutoFields(ICustomCourseTicket).omit('course_category',
             'ticket_session')
+        else:
+            return grok.AutoFields(ICustomCourseTicket).omit('score', 'ca',
+                'course_category', 'ticket_session')
 
 class CustomCourseTicketManageFormPage(CourseTicketManageFormPage):
