Changeset 16054 for main/kofacustom.iuokada/trunk/src
- Timestamp:
- 16 Apr 2020, 16:17:39 (5 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser.py
r16053 r16054 183 183 """ 184 184 185 @property186 def display_refereereports(self):187 if self.context.refereereports:188 return True189 return False190 191 185 def display_fileupload(self, filename): 192 186 if filename[1] == 'res_stat.pdf': -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/utils.py
r16052 r16054 75 75 } 76 76 77 def sortCertificates(self, context, resultset): 78 """Sort already filtered certificates in `AppCatCertificateSource`. 79 """ 80 resultlist = sorted(resultset, key=lambda 81 value: value.__parent__.__parent__.__parent__.code + 82 value.__parent__.__parent__.code + 83 value.code) 84 curr_course = context.course1 85 if curr_course is not None and curr_course not in resultlist: 86 resultlist = [curr_course,] + resultlist 87 return resultlist 88 77 89 def getCertTitle(self, context, value): 78 90 """Compose the titles in `AppCatCertificateSource`. 79 91 """ 80 return "%s (%s)" % (value.title, value.code) 92 try: title = "%s / %s / %s (%s)" % ( 93 value.__parent__.__parent__.__parent__.code, 94 value.__parent__.__parent__.code, 95 value.title, value.code) 96 except AttributeError: 97 title = "NA / %s (%s)" % (value.title, value.code) 98 return title
Note: See TracChangeset for help on using the changeset viewer.