- Timestamp:
- 27 Aug 2013, 19:13:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r10479 r10539 22 22 import grok 23 23 from zope.component.interfaces import IFactory 24 from zope.component import createObject 24 from zope.catalog.interfaces import ICatalog 25 from zope.component import createObject, queryUtility 25 26 from zope.interface import implementedBy 26 27 from waeup.kofa.interfaces import academic_sessions_vocab … … 270 271 return getGradeWeightFromScore(self.score)[1] 271 272 273 @property 274 def course(self): 275 """Returns the course the ticket is referring to. Returns 276 None if the course has been removed. 277 278 This method is not used in Kofa anymore. 279 """ 280 cat = queryUtility(ICatalog, name='courses_catalog') 281 result = cat.searchResults(code=(self.code, self.code)) 282 if len(result) != 1: 283 return None 284 return list(result)[0] 285 272 286 CourseTicket = attrs_to_fields(CourseTicket) 273 287
Note: See TracChangeset for help on using the changeset viewer.