Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 13722)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 13723)
@@ -232,4 +232,55 @@
             note=self.note)
 
+class ExportExaminationScheduleSlip(UtilityView, grok.View):
+    """Deliver a examination schedule slip.
+
+    This form page is available only in Uniben.
+    """
+    grok.context(ICustomStudent)
+    grok.name('examination_schedule_slip.pdf')
+    grok.require('waeup.viewStudent')
+    prefix = 'form'
+
+    label = u'Examination Schedule Slip'
+
+    omit_fields = (
+        'suspended', 'phone', 'email',
+        'adm_code', 'suspended_comment',
+        'date_of_birth', 'current_level',
+        'current_mode',
+        'entry_session',
+        'flash_notice')
+
+    form_fields = []
+
+    @property
+    def note(self):
+        return """
+<br /><br /><br /><br /><font size='12'>
+Your examination date, time and venue is scheduled as follows:
+<br /><br />
+<strong>%s</strong>
+</font>
+
+""" % self.context.flash_notice
+        return
+
+
+    def update(self):
+        if not self.context.flash_notice \
+            or not 'exam' in self.context.flash_notice.lower():
+            self.flash(_('Forbidden'), type="warning")
+            self.redirect(self.url(self.context))
+
+    def render(self):
+        studentview = StudentBasePDFFormPage(self.context.student,
+            self.request, self.omit_fields)
+        students_utils = getUtility(IStudentsUtils)
+        return students_utils.renderPDF(
+            self, 'examination_schedule_slip',
+            self.context.student, studentview,
+            omit_fields=self.omit_fields,
+            note=self.note)
+
 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 13722)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 13723)
@@ -194,4 +194,21 @@
         self.browser.open(self.student_path + '/edit_personal')
         self.assertTrue('parent_email' in self.browser.contents)
+
+    def test_examination_schedule_slip(self):
+        self.student.flash_notice = u'My Examination Date'
+        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.browser.getLink("Download examination schedule 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(), 'examination_schedule_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF examination_schedule_slip.pdf written to %s" % path
+        # If flash_notive does not contain exam' the button does not show up.
+        self.student.flash_notice = u'anything'
+        self.browser.open(self.student_path)
+        self.assertFalse('examination schedule slip' in self.browser.contents)
 
     def test_manage_payments(self):
@@ -929,7 +946,4 @@
         self.browser.getControl(name="form.p_category").value = ['bed_allocation']
         self.browser.getControl("Create ticket").click()
-        ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[0]
-        self.browser.getLink(value).click()
         p_ticket = self.student['payments'].values()[0]
         p_ticket.approveStudentPayment()
@@ -1029,8 +1043,6 @@
         self.assertMatches('...Payment ticket created...',
                            self.browser.contents)
-        ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[0]
         # Maintennace fee is taken from the hostel object.
-        self.assertEqual(self.student['payments'][value].amount_auth, 876.0)
+        self.assertEqual(self.student['payments'].values()[1].amount_auth, 876.0)
         # If the hostel's maintenance fee isn't set, the fee is
         # taken from the session configuration object.
@@ -1039,6 +1051,4 @@
         self.browser.getControl(name="form.p_category").value = ['hostel_maintenance']
         self.browser.getControl("Create ticket").click()
-        ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[1]
-        self.assertEqual(self.student['payments'][value].amount_auth, 987.0)
+        self.assertEqual(self.student['payments'].values()[2].amount_auth, 987.0)
         return
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 13722)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 13723)
@@ -24,8 +24,9 @@
     ICustomStudent, )
 from waeup.kofa.students.fileviewlets import (
-    StudentFileDisplay, StudentFileUpload, StudentImage)
+    StudentFileDisplay, StudentFileUpload, StudentImage,)
 from waeup.kofa.students.browser import (
     ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
-    StudyLevelDisplayFormPage, StudentClearanceDisplayFormPage)
+    StudyLevelDisplayFormPage, StudentClearanceDisplayFormPage,
+    StudentBaseDisplayFormPage)
 
 from kofacustom.nigeria.interfaces import MessageFactory as _
@@ -94,4 +95,19 @@
         return False
 
+class ExaminationScheduleSlipActionButton(ManageActionButton):
+    grok.order(10)
+    grok.context(ICustomStudent)
+    grok.view(StudentBaseDisplayFormPage)
+    grok.require('waeup.viewStudent')
+    icon = 'actionicon_pdf.png'
+    text = _('Download examination schedule slip')
+    target = 'examination_schedule_slip.pdf'
+
+    @property
+    def target_url(self):
+        if self.context.flash_notice \
+            and 'exam' in self.context.flash_notice.lower():
+            return self.view.url(self.view.context, self.target)
+        return False
 
 # JAMB Letter
