Index: main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 14833)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 14834)
@@ -283,4 +283,34 @@
             note=self.note)
 
+class ExportJUPEBResultSlip(ExportExaminationScheduleSlip):
+    """Deliver a JUPEB result slip.
+
+    This form page is available only in Uniben.
+    """
+
+    grok.name('jupeb_result_slip.pdf')
+    label = u'JUPEB Result Slip'
+
+    @property
+    def note(self):
+        return """
+<br /><br /><br /><br /><font size='12'>
+Your JUPEB results are as follows:
+<br /><br />
+<strong>%s</strong>
+</font>
+<br /><br /><br /><br />
+<font size='8'>
+Key: A = 5, B = 4, C = 3, D = 2, E = 1, F = 0, X = Absent, Q = Cancelled
+</font>
+
+""" % self.context.flash_notice
+        return
+
+    def update(self):
+        if not self.context.flash_notice or self.context.faccode != 'JUPEB':
+            self.flash(_('Forbidden'), type="warning")
+            self.redirect(self.url(self.context))
+
 class CustomStudentPersonalDisplayFormPage(
     NigeriaStudentPersonalDisplayFormPage):
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 14833)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 14834)
@@ -31,4 +31,6 @@
 from waeup.kofa.authentication import LocalRoleSetEvent
 from waeup.kofa.app import University
+from waeup.kofa.university.faculty import Faculty
+from waeup.kofa.university.department import Department
 from waeup.kofa.students.tests.test_browser import StudentsFullSetup
 from waeup.kofa.students.accommodation import BedTicket
@@ -211,4 +213,29 @@
         self.browser.open(self.student_path)
         self.assertFalse('examination schedule slip' in self.browser.contents)
+
+    def test_jupeb_result_slip(self):
+        self.student.flash_notice = u'My JUPEB results'
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.assertFalse('JUPEB result slip' in self.browser.contents)
+        # Create JUPEB faculty
+        cert = createObject('waeup.Certificate')
+        cert.code = u'xyz'
+        self.app['faculties']['JUPEB'] = Faculty(code=u'JUPEB')
+        self.app['faculties']['JUPEB']['dep1'] = Department(code=u'dep1')
+        self.app['faculties']['JUPEB']['dep1'].certificates.addCertificate(cert)
+        self.student['studycourse'].certificate = cert
+        self.browser.open(self.student_path)
+        self.browser.getLink("Download JUPEB result slip").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'jupeb_result_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF jupeb_result_slip.pdf written to %s" % path
+        self.student.flash_notice = u''
+        self.browser.open(self.student_path)
+        self.assertFalse('JUPEB result slip' in self.browser.contents)
 
     def test_manage_payments(self):
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 14833)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 14834)
@@ -111,4 +111,19 @@
         return False
 
+class JUPEBResultSlipActionButton(ManageActionButton):
+    grok.order(11)
+    grok.context(ICustomStudent)
+    grok.view(StudentBaseDisplayFormPage)
+    grok.require('waeup.viewStudent')
+    icon = 'actionicon_pdf.png'
+    text = _('Download JUPEB result slip')
+    target = 'jupeb_result_slip.pdf'
+
+    @property
+    def target_url(self):
+        if self.context.flash_notice and self.context.faccode == 'JUPEB':
+            return self.view.url(self.view.context, self.target)
+        return False
+
 # JAMB Letter
 
