Changeset 9501
- Timestamp:
- 2 Nov 2012, 05:39:40 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r9486 r9501 494 494 """ 495 495 496 def addCertCourseTickets(cert): 497 """Collect all certificate courses and create course 498 tickets automatically. 499 """ 500 496 501 class ICourseTicket(IKofaObject): 497 502 """An interface for course tickets. -
main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py
r9131 r9501 78 78 'StudentStudyCourses contain only IStudentStudyLevel instances') 79 79 self[str(studylevel.level)] = studylevel 80 81 #Create course tickets automatically 82 if cert is not None: 83 for key, val in cert.items(): 84 if val.level != studylevel.level: 85 continue 86 ticket = createObject(u'waeup.CourseTicket') 87 ticket.code = val.getCourseCode() 88 ticket.automatic = True 89 ticket.mandatory = val.mandatory 90 ticket.title = val.course.title 91 ticket.fcode = val.course.__parent__.__parent__.__parent__.code 92 ticket.dcode = val.course.__parent__.__parent__.code 93 ticket.credits = val.course.credits 94 ticket.passmark = val.course.passmark 95 ticket.semester = val.course.semester 96 ticket.carry_over = False 97 self[str(studylevel.level)][ticket.code] = ticket 80 studylevel.addCertCourseTickets(cert) 98 81 # Collect carry-over courses in base levels (not in repeating levels) 99 82 try: -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r9420 r9501 22 22 import grok 23 23 from zope.component.interfaces import IFactory 24 from zope.component import createObject 24 25 from zope.interface import implementedBy 25 26 from waeup.kofa.students.interfaces import ( … … 86 87 ticket.semester = course.semester 87 88 self[ticket.code] = ticket 89 return 90 91 def addCertCourseTickets(self, cert): 92 """Collect all certificate courses and create course 93 tickets automatically. 94 """ 95 if cert is not None: 96 for key, val in cert.items(): 97 if val.level != self.level: 98 continue 99 ticket = createObject(u'waeup.CourseTicket') 100 ticket.automatic = True 101 ticket.mandatory = val.mandatory 102 ticket.carry_over = False 103 self.addCourseTicket(ticket, val.course) 88 104 return 89 105
Note: See TracChangeset for help on using the changeset viewer.