Changeset 14902 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 17 Nov 2017, 16:12:06 (7 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r14835 r14902 135 135 'phone', 'adm_code', 'email', 'date_of_birth', 136 136 'flash_notice') 137 if self.context. faccode == 'JUPEB':137 if self.context.is_jupeb: 138 138 omit_fields += ('faculty', 'department') 139 139 return omit_fields … … 143 143 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 144 144 line0 = '' 145 if self.context. faccode == 'JUPEB':145 if self.context.is_jupeb: 146 146 line0 = 'Joint Universities Preliminary Examinations Board (JUPEB)\n' 147 147 line1 = translate(_('Clearance Slip of'), … … 307 307 308 308 def update(self): 309 if not self.context.flash_notice or self.context.faccode != 'JUPEB'\309 if not self.context.flash_notice or not self.context.is_jupeb \ 310 310 or not 'results' in self.context.flash_notice.lower(): 311 311 self.flash(_('Forbidden'), type="warning") -
main/waeup.uniben/trunk/src/waeup/uniben/students/student.py
r13085 r14902 41 41 def transcript_enabled(self): 42 42 user = get_current_principal() 43 if user.id in ('admin', 'isouaba', 'med', 'delejason', 'zope.mgr'): 43 if user.id in ('admin', 'isouaba', 'med', 'zope.mgr'): 44 return True 45 return False 46 47 @property 48 def is_jupeb(self): 49 if self.faccode.startswith('JUPEB'): 44 50 return True 45 51 return False -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r14898 r14902 224 224 cert = createObject('waeup.Certificate') 225 225 cert.code = u'xyz' 226 self.app['faculties']['JUPEB '] = Faculty(code=u'JUPEB')227 self.app['faculties']['JUPEB ']['dep1'] = Department(code=u'dep1')228 self.app['faculties']['JUPEB ']['dep1'].certificates.addCertificate(cert)226 self.app['faculties']['JUPEB123'] = Faculty(code=u'JUPEB123') 227 self.app['faculties']['JUPEB123']['dep1'] = Department(code=u'dep1') 228 self.app['faculties']['JUPEB123']['dep1'].certificates.addCertificate(cert) 229 229 self.student['studycourse'].certificate = cert 230 230 self.browser.open(self.student_path) -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r14898 r14902 263 263 if p_item is None: 264 264 return _('Study course data are incomplete.'), None 265 if student. faccode == 'JUPEB':265 if student.is_jupeb: 266 266 amount = 50000.0 267 267 elif student.faccode.startswith('FCETA'): … … 279 279 except (AttributeError, TypeError): 280 280 return _('Study course data are incomplete.'), None 281 282 #####################################################283 #if student.faccode == 'JUPEB':284 # return _('Payment temporarily disabled.'), None285 #####################################################286 287 288 281 if previous_session: 289 282 # Students can pay for previous sessions in all workflow states. -
main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
r14835 r14902 122 122 @property 123 123 def target_url(self): 124 if self.context.flash_notice and self.context. faccode == 'JUPEB'\124 if self.context.flash_notice and self.context.is_jupeb \ 125 125 and 'results' in self.context.flash_notice.lower(): 126 126 return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.