Changeset 14353
- Timestamp:
- 16 Dec 2016, 11:52:34 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/studylevel.py
r10481 r14353 27 27 StudentStudyLevel, CourseTicket, 28 28 CourseTicketFactory, StudentStudyLevelFactory) 29 from waeup.kofa.students.interfaces import IStudentNavigation 29 from waeup.kofa.students.interfaces import IStudentNavigation, ICourseTicket 30 30 from waeup.uniben.students.interfaces import ( 31 31 ICustomStudentStudyLevel, ICustomCourseTicket) … … 37 37 grok.implements(ICustomStudentStudyLevel, IStudentNavigation) 38 38 grok.provides(ICustomStudentStudyLevel) 39 40 def addCourseTicket(self, ticket, course): 41 """Add a course ticket object. 42 """ 43 if not ICourseTicket.providedBy(ticket): 44 raise TypeError( 45 'StudentStudyLeves contain only ICourseTicket instances') 46 ticket.code = course.code 47 ticket.title = course.title 48 ticket.fcode = course.__parent__.__parent__.__parent__.code 49 ticket.dcode = course.__parent__.__parent__.code 50 ticket.credits = course.credits 51 ticket.passmark = course.passmark 52 ticket.semester = course.semester 53 self[ticket.code] = ticket 54 return 39 55 40 56 CustomStudentStudyLevel = attrs_to_fields(
Note: See TracChangeset for help on using the changeset viewer.