Changeset 10539 for main/waeup.kofa/trunk/src
- Timestamp:
- 27 Aug 2013, 19:13:51 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 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 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10536 r10539 1661 1661 self.browser.getControl("Show").click() 1662 1662 self.assertTrue(self.student_id in self.browser.contents) 1663 # XXX: So far the lecturer can neither access ths student ... 1663 # The course ticket can be linked with the course. 1664 self.assertEqual( 1665 self.student['studycourse']['100']['COURSE1'].course, 1666 self.course) 1667 # Lecturer can neither access ths student ... 1664 1668 self.assertRaises( 1665 1669 Unauthorized, self.browser.open, self.student_path) 1666 1670 # ... nor the respective course ticket since a 1667 # CourseTicketPrincipalRoleManager does not yet exist. 1671 # editing course tickets by lecturers is not feasible. 1672 # Course results must be imported. 1668 1673 self.assertTrue('COURSE1' in self.student['studycourse']['100'].keys()) 1669 1674 course_ticket_path = self.student_path + '/studycourse/100/COURSE1'
Note: See TracChangeset for help on using the changeset viewer.