Index: /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/browser.py
===================================================================
--- /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/browser.py	(revision 15742)
+++ /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/browser.py	(revision 15743)
@@ -29,5 +29,5 @@
     StudentBasePDFFormPage, ExportPDFCourseRegistrationSlip,
     CourseTicketDisplayFormPage, StudentTriggerTransitionFormPage,
-    ExportPDFTranscriptSlip, BedTicketAddPage,
+    ExportPDFTranscriptSlip, BedTicketAddPage, ExportPDFAdmissionSlip,
     msave, emit_lock_message)
 from waeup.kofa.students.interfaces import (
@@ -233,2 +233,51 @@
             self.context.student, omit_fields=self.omit_fields,
             pre_text='', post_text='')
+
+class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip):
+    """Deliver a PDF Admission slip.
+    """
+
+    @property
+    def pre_text(self):
+        return (
+            'I am pleased to inform you that you have been offered '
+            'provisional admission into the Delta State Polytechnic, '
+            'Ogwashi-Uku as follows:')
+
+    @property
+    def post_text(self):
+        return """1. 	This offer is conditional upon the confirmation of your qualification(s) as listed by you in the application form or which you claim to possess as at when this offer of admission was made and your meeting the minimum department entry requirement.
+
+2. At the time of Registration, you will be required to produce the original copies of your certificates or any other acceptable evidence of the qualification(s), on which this offer of admission has been based.
+
+3. If at any time after admission it is discovered that you do not possess any of the qualifications which you claimed to have obtained, you will be required to withdraw from the Polytechnic.
+
+4. Please, note that resumption/registration starts immediately.
+
+5. You are required to pay all the necessary fees, such as school fees, students\' union fees, boarding fees (optional) and any other prescribed fees online and register immediately. Late registration will attract severe sanction such as payment of late registration fee of N10000 or outright withdrawal of offer of admission.
+
+6. If you do not respond to this offer within two (2) weeks from the date of resumption, the Polytechnic will assume that you are not interested in the offer and may withdraw the offer to accommodate other candidates on awaiting list.
+
+7. If you do not pay your school fees and register within the stipulated time frame for registration, you would not be allowed to write the Polytechnic\'s semester examinations. Should you mistakenly write the exams, your scripts would not be marked.
+
+8. You are required to present at the time of registration, a letter of attestation from a clergy man, a lawyer,  a senior civil servant (Level 13 and above) or any person of reputable standing in the society.
+
+9. Before the commencement of registration, you will be required to undergo a medical examination which should be conducted in the Polytechnic clinic.
+
+10. Other information/instructions about facilities at the Polytechnic, including accommodation, can be obtained from the Polytechnic Portal. The Head of your School/Department at the Polytechnic will make the details of the programme available to you.
+
+11. At the time of registration, you are required to sign an undertaking of non-involvement in cult-related activities and acts of vandalism.
+
+12. We hope that you will be able to take advantage of this offer or provisional admission.
+
+13. Please, accept our hearty congratulations.
+
+Admissions Officer
+For: Registrar
+"""
+
+    def render(self):
+        students_utils = getUtility(IStudentsUtils)
+        return students_utils.renderPDFAdmissionLetter(self,
+            self.context.student, omit_fields=self.omit_fields,
+            pre_text=self.pre_text, post_text=self.post_text)
Index: /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/tests/test_browser.py
===================================================================
--- /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/tests/test_browser.py	(revision 15742)
+++ /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/tests/test_browser.py	(revision 15743)
@@ -31,4 +31,5 @@
 from waeup.kofa.students.accommodation import BedTicket
 from waeup.kofa.testing import FunctionalTestCase
+from waeup.kofa.browser.tests.test_pdf import samples_dir
 from waeup.kofa.interfaces import (
     IExtFileStore, IFileStoreNameChooser)
@@ -44,2 +45,31 @@
     def test_dummytest(self):
         return
+
+    def test_student_clearance(self):
+        # Student cant login if their password is not set
+        IWorkflowInfo(self.student).fireTransition('admit')
+        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.assertMatches(
+            '...You logged in...', self.browser.contents)
+        # Admitted student can upload a passport picture
+        #self.browser.open(self.student_path + '/change_portrait')
+        #ctrl = self.browser.getControl(name='passportuploadedit')
+        #file_obj = open(SAMPLE_IMAGE, 'rb')
+        #file_ctrl = ctrl.mech_control
+        #file_ctrl.add_file(file_obj, filename='my_photo.jpg')
+        #self.browser.getControl(
+         #   name='upload_passportuploadedit').click()
+        #elf.assertTrue(
+         #   'src="http://localhost/app/students/K1000000/passport.jpg"'
+         #   in self.browser.contents)
+        ## Students can open admission letter
+        self.browser.getLink("Base Data").click()
+        self.browser.getLink("Download admission letter").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'admission_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF admission_slip.pdf written to %s" % path
Index: /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py
===================================================================
--- /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py	(revision 15742)
+++ /main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py	(revision 15743)
@@ -80,4 +80,16 @@
         d['bt'] = u'%s_%s_%s' % (special_handling,sex,bt)
         return d
+
+    def getBedCoordinates(self, bedticket):
+        """Translated coordinates:
+
+        Hall Name, Block Letter, Room Number, Bed Letter =
+        Hall Name, M/F + Room Number-100, Bed Letter
+
+        Requirements: Gender must be part of bed_coordinates and all hostels
+        have only one block with only one floor
+        """
+        ### ToDo
+        return bedticket.bed_coordinates
 
     def getReturningData(self, student):
