- Timestamp:
- 2 Nov 2012, 06:13:11 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r8867 r9502 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.utils.helpers import attrs_to_fields … … 37 38 grok.implements(ICustomStudentStudyLevel, IStudentNavigation) 38 39 grok.provides(ICustomStudentStudyLevel) 40 41 def addCertCourseTickets(self, cert): 42 """Collect all certificate courses and create course 43 tickets automatically. 44 45 Add ticket only if student has paid for the course.semester. 46 """ 47 payments = self.student.getPaymentTuples() 48 if cert is not None: 49 for key, val in cert.items(): 50 if val.level != self.level: 51 continue 52 if val.course.semester == 2 and \ 53 not (self.student.current_session, 54 'schoolfee_2', 'paid') in payments: 55 continue 56 ticket = createObject(u'waeup.CourseTicket') 57 ticket.automatic = True 58 ticket.mandatory = val.mandatory 59 ticket.carry_over = False 60 self.addCourseTicket(ticket, val.course) 61 return 39 62 40 63 CustomStudentStudyLevel = attrs_to_fields(CustomStudentStudyLevel)
Note: See TracChangeset for help on using the changeset viewer.