- Timestamp:
- 27 Mar 2023, 21:26:16 (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r17140 r17366 157 157 return False 158 158 return container.with_picture 159 160 def sortCertificates(self, context, resultset): 161 """Sort already filtered certificates in `AppCatCertificateSource`. 162 """ 163 resultlist = sorted(resultset, key=lambda 164 value: value.__parent__.__parent__.__parent__.code + 165 value.__parent__.__parent__.code + 166 value.code) 167 curr_course = context.course1 168 if curr_course is not None and curr_course not in resultlist: 169 resultlist = [curr_course,] + resultlist 170 return resultlist 171 172 def getCertTitle(self, context, value): 173 """Compose the titles in `AppCatCertificateSource`. 174 """ 175 try: title = "%s / %s / %s (%s)" % ( 176 value.__parent__.__parent__.__parent__.title, 177 value.__parent__.__parent__.title, 178 value.title, value.code) 179 except AttributeError: 180 title = "NA / %s (%s)" % (value.title, value.code) 181 return title
Note: See TracChangeset for help on using the changeset viewer.