- Timestamp:
- 7 Nov 2019, 15:43:51 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py
r15755 r15770 38 38 # Buttons 39 39 40 def module_activated(session): 40 def module_activated(session, payment): 41 if payment.r_company and payment.r_company != 'interswitch': 42 return False 41 43 try: 42 44 return getattr(grok.getSite()['configuration'][str(session)], … … 56 58 @property 57 59 def target_url(self): 58 if not module_activated(self.context.student.current_session): 60 if not module_activated( 61 self.context.student.current_session, self.context): 59 62 return '' 60 63 if self.context.p_state != 'unpaid': … … 68 71 @property 69 72 def target_url(self): 70 if not module_activated(self.context.__parent__.__parent__.year): 73 if not module_activated( 74 self.context.__parent__.__parent__.year, self.context): 71 75 return '' 72 76 if self.context.p_state != 'unpaid': … … 85 89 @property 86 90 def target_url(self): 87 if not module_activated(self.context.student.current_session): 91 if not module_activated( 92 self.context.student.current_session, self.context): 88 93 return '' 89 94 if self.context.p_state in ('paid', 'waived'): … … 98 103 @property 99 104 def target_url(self): 100 if not module_activated(self.context.__parent__.__parent__.year): 105 if not module_activated( 106 self.context.__parent__.__parent__.year, self.context): 101 107 return '' 102 108 if self.context.p_state in ('paid', 'waived'): … … 115 121 @property 116 122 def target_url(self): 117 if not module_activated(self.context.student.current_session): 123 if not module_activated( 124 self.context.student.current_session, self.context): 118 125 return '' 119 126 if self.context.p_state != 'paid' \ … … 129 136 @property 130 137 def target_url(self): 131 if not module_activated(self.context.__parent__.__parent__.year): 138 if not module_activated( 139 self.context.__parent__.__parent__.year, self.context): 132 140 return '' 133 141 if self.context.p_state != 'paid' \ … … 152 160 153 161 def update(self): 154 if not module_activated(self.context.student.current_session): 162 if not module_activated( 163 self.context.student.current_session, self.context): 155 164 return 156 165 if self.context.p_state in ('paid', 'waived'): … … 191 200 192 201 def update(self): 193 if not module_activated(self.context.__parent__.__parent__.year): 202 if not module_activated( 203 self.context.__parent__.__parent__.year, self.context): 194 204 return 195 205 if self.context.p_state == 'paid': … … 230 240 231 241 def update(self): 232 if not module_activated(self.context.student.current_session): 242 if not module_activated( 243 self.context.student.current_session, self.context): 233 244 return 234 245 if self.context.p_state != 'paid' \ … … 266 277 267 278 def update(self): 268 if not module_activated(self.context.__parent__.__parent__.year): 279 if not module_activated( 280 self.context.__parent__.__parent__.year, self.context): 269 281 return 270 282 if self.context.p_state != 'paid' \ … … 348 360 349 361 def update(self): 350 if not module_activated(self.context.student.current_session): 362 if not module_activated( 363 self.context.student.current_session, self.context): 351 364 return 352 365 error = self.init_update() … … 406 419 407 420 def update(self): 408 if not module_activated(self.context.__parent__.__parent__.year): 421 if not module_activated( 422 self.context.__parent__.__parent__.year, self.context): 409 423 return 410 424 error = self.init_update()
Note: See TracChangeset for help on using the changeset viewer.