Index: main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 9250)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 9251)
@@ -27,12 +27,35 @@
     StudentClearPage, StudentRejectClearancePage,
     StudyCourseDisplayFormPage, msave, emit_lock_message)
+from waeup.kofa.students.workflow import FORBIDDEN_POSTGRAD_TRANS
 from kofacustom.nigeria.students.browser import (
     NigeriaOnlinePaymentDisplayFormPage,
+    NigeriaStudentBaseManageFormPage,
     NigeriaOnlinePaymentAddFormPage,
     NigeriaExportPDFPaymentSlipPage)
+#from waeup.uniben.students.interfaces import ICustomStudent
 
 from waeup.uniben.students.interfaces import (
     ICustomStudentOnlinePayment, ICustomStudentStudyCourse)
 from waeup.uniben.interfaces import MessageFactory as _
+
+class CustomStudentBaseManageFormPage(NigeriaStudentBaseManageFormPage):
+    """ View to manage student base data
+    """
+    #grok.context(ICustomStudent)
+
+    def getTransitions(self):
+        """Return a list of dicts of allowed transition ids and titles.
+
+        Each list entry provides keys ``name`` and ``title`` for
+        internal name and (human readable) title of a single
+        transition.
+        """
+        allowed_transitions = [t for t in self.wf_info.getManualTransitions()
+            if not t[0].startswith('pay')]
+        if self.context.is_postgrad and not self.context.is_special_postgrad:
+            allowed_transitions = [t for t in allowed_transitions
+                if not t[0] in FORBIDDEN_POSTGRAD_TRANS]
+        return [dict(name='', title=_('No transition'))] +[
+            dict(name=x, title=y) for x, y in allowed_transitions]
 
 class CustomOnlinePaymentDisplayFormPage(NigeriaOnlinePaymentDisplayFormPage):
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/student.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/student.py	(revision 9250)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/student.py	(revision 9251)
@@ -35,4 +35,10 @@
     grok.provides(ICustomStudent)
 
+    @property
+    def is_special_postgrad(self):
+        is_special_postgrad = getattr(
+            self.get('studycourse', None), 'is_special_postgrad', False)
+        return is_special_postgrad
+
 
 # Set all attributes of Student required in IStudent as field
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/studycourse.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/studycourse.py	(revision 9250)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/studycourse.py	(revision 9251)
@@ -37,4 +37,17 @@
 
     @property
+    def is_postgrad(self):
+        if self.certificate is None:
+            return False
+        return self.certificate.study_mode.startswith('pg') or \
+            self.certificate.study_mode.startswith('special_pg')
+
+    @property
+    def is_special_postgrad(self):
+        if self.certificate is None:
+            return False
+        return self.certificate.study_mode.startswith('special_pg')
+
+    @property
     def next_session_allowed(self):
         state = self.student.state
@@ -56,5 +69,6 @@
         cond5 = self.is_postgrad
         cond6 = state == PAID
-        if  cond5 and cond6:
+        cond7 = self.is_special_postgrad
+        if  cond5 and cond6 and not cond7:
             return True
         return False
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 9250)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 9251)
@@ -73,4 +73,47 @@
     layer = FunctionalLayer
 
+    def test_next_session_allowed(self):
+        # Let's see if next_session_allowed works as expected
+        # A, ug_ft, 100
+        IWorkflowState(self.student).setState('returning')
+        self.assertTrue(self.student['studycourse'].next_session_allowed)
+        # Uniben special PG programmes have the same workflow
+        # as UG students
+        self.certificate.study_mode = 'special_pg_pt'
+        self.assertTrue(self.student['studycourse'].next_session_allowed)
+        IWorkflowState(self.student).setState('school fee paid')
+        self.assertFalse(self.student['studycourse'].next_session_allowed)
+        # Now we convert the certificate into a 'regular
+        # postgraduate certificate ...
+        self.certificate.study_mode = 'pg_ft'
+        # ... and voila next session registration is allowed
+        self.assertTrue(self.student['studycourse'].next_session_allowed)
+
+    def test_manage_access(self):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        # The student created in the base package is a ug student
+        self.browser.open(self.manage_clearance_path)
+        self.assertMatches('...First Sitting Record...',
+                           self.browser.contents)
+        # There is no pg field in the clearance form
+        self.assertFalse('Second Higher Education Record'
+            in self.browser.contents)
+        # Now we change the study mode ...
+        self.certificate.study_mode = 'pg_ft'
+        self.browser.open(self.clearance_path)
+        # ... and additional pg clearance fields appear
+        self.assertMatches('...Second Higher Education Record...',
+                           self.browser.contents)
+        # But also fields from the ug form are displayed
+        self.assertMatches('...First Sitting Record...',
+                           self.browser.contents)
+        # The same holds for Uniben's special pg students
+        self.certificate.study_mode = 'special_pg_ft'
+        self.browser.open(self.clearance_path)
+        self.assertMatches('...Second Higher Education Record...',
+                           self.browser.contents)
+        self.assertMatches('...First Sitting Record...',
+                           self.browser.contents)
+
     def test_manage_payments(self):
         # Add missing configuration data
@@ -301,5 +344,4 @@
         self.assertEqual(payment.p_item, u'CERT1')
         self.assertEqual(error, None)
-
         self.student.is_staff = True
         error, payment = utils.setPaymentDetails('schoolfee',
@@ -332,4 +374,39 @@
         self.assertEqual(payment.p_session, 2005)
         self.assertEqual(payment.amount_auth, 20088.0)
+        self.assertEqual(payment.p_item, u'CERT1')
+        self.assertEqual(error, None)
+
+        # In Uniben we have pg and special pg students.
+        # They pay the same but their workflow is different.
+        IWorkflowState(self.student).setState('school fee paid')
+        self.student.is_staff = False
+        self.student.nationality = u'NG'
+        self.certificate.school_fee_2 = 10000.0
+        error, payment = utils.setPaymentDetails(
+            'schoolfee', self.student, None, None)
+        self.assertEqual(payment, None)
+        self.assertTrue('not be determined' in error)
+        self.certificate.study_mode = 'pg_pt'
+        self.assertTrue(self.student.is_postgrad)
+        self.assertFalse(self.student.is_special_postgrad)
+        error, payment = utils.setPaymentDetails(
+            'schoolfee', self.student, None, None)
+        self.assertEqual(payment.p_level, 100)
+        self.assertEqual(payment.p_session, 2005)
+        self.assertEqual(payment.amount_auth, 10000.0)
+        self.assertEqual(payment.p_item, u'CERT1')
+        self.assertEqual(error, None)
+        self.certificate.study_mode = 'special_pg_pt'
+        self.assertTrue(self.student.is_postgrad)
+        self.assertTrue(self.student.is_special_postgrad)
+        error, payment = utils.setPaymentDetails(
+            'schoolfee', self.student, None, None)
+        self.assertTrue('not be determined' in error)
+        IWorkflowState(self.student).setState('returning')
+        error, payment = utils.setPaymentDetails(
+            'schoolfee', self.student, None, None)
+        self.assertEqual(payment.p_level, 200)
+        self.assertEqual(payment.p_session, 2005)
+        self.assertEqual(payment.amount_auth, 10000.0)
         self.assertEqual(payment.p_item, u'CERT1')
         self.assertEqual(error, None)
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 9250)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 9251)
@@ -132,7 +132,8 @@
                     except KeyError:
                         return _(u'Session configuration object is not available.'), None
-                elif student.is_postgrad and student.state == PAID:
-                    # Returning postgraduate students also pay for the next session
-                    # but their level always remains the same.
+                elif student.state == PAID  and student.is_postgrad and \
+                    not student.is_special_postgrad:
+                    # Regular returning postgraduate students also pay 
+                    # for the next session but their level always remains the same.
                     p_session += 1
                     if student.is_foreigner:
