Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py	(revision 14737)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py	(revision 14755)
@@ -36,4 +36,11 @@
 # Buttons
 
+def module_activated(session):
+    try:
+        return getattr(grok.getSite()['configuration'][str(session)],
+            'interswitch_enabled', True)
+    except KeyError:
+        return False
+
 class InterswitchActionButtonStudent(ManageActionButton):
     grok.order(1)
@@ -47,4 +54,6 @@
     @property
     def target_url(self):
+        if not module_activated(self.context.student.current_session):
+            return ''
         if self.context.p_state != 'unpaid':
             return ''
@@ -54,4 +63,12 @@
     grok.view(OPDPApplicant)
     grok.require('waeup.payApplicant')
+
+    @property
+    def target_url(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            return ''
+        if self.context.p_state != 'unpaid':
+            return ''
+        return self.view.url(self.view.context, self.target)
 
 class InterswitchRequestWebserviceActionButtonStudent(ManageActionButton):
@@ -66,4 +83,6 @@
     @property
     def target_url(self):
+        if not module_activated(self.context.student.current_session):
+            return ''
         if self.context.p_state in ('paid', 'waived'):
             return ''
@@ -74,4 +93,12 @@
     grok.view(OPDPApplicant)
     grok.require('waeup.payApplicant')
+
+    @property
+    def target_url(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            return ''
+        if self.context.p_state in ('paid', 'waived'):
+            return ''
+        return self.view.url(self.view.context, self.target)
 
 class InterswitchVerifyWebserviceActionButtonStudent(ManageActionButton):
@@ -86,4 +113,6 @@
     @property
     def target_url(self):
+        if not module_activated(self.context.student.current_session):
+            return ''
         if self.context.p_state != 'paid' \
             or self.context.r_company != u'interswitch':
@@ -96,4 +125,12 @@
     grok.require('waeup.manageApplication')
 
+    @property
+    def target_url(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            return ''
+        if self.context.p_state != 'paid' \
+            or self.context.r_company != u'interswitch':
+            return ''
+        return self.view.url(self.view.context, self.target)
 
 # Webservice request views
@@ -113,4 +150,6 @@
 
     def update(self):
+        if not module_activated(self.context.student.current_session):
+            return
         if self.context.p_state in ('paid', 'waived'):
             self.flash(_('This ticket has already been paid.'), type='danger')
@@ -150,4 +189,6 @@
 
     def update(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            return
         if self.context.p_state == 'paid':
             self.flash(_('This ticket has already been paid.'), type='danger')
@@ -187,4 +228,6 @@
 
     def update(self):
+        if not module_activated(self.context.student.current_session):
+            return
         if self.context.p_state  != 'paid' \
             or self.context.r_company != u'interswitch':
@@ -221,4 +264,6 @@
 
     def update(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            return
         if self.context.p_state != 'paid' \
             or self.context.r_company != u'interswitch':
@@ -299,4 +344,6 @@
 
     def update(self):
+        if not module_activated(self.context.student.current_session):
+            return
         error = self.init_update()
         if error:
@@ -345,4 +392,6 @@
 
     def update(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            return
         error = self.init_update()
         if error:
