Ignore:
Timestamp:
2 May 2012, 09:40:57 (13 years ago)
Author:
Henrik Bettermann
Message:

Use factory for the creation of CourseTickets?.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r8323 r8325  
    927927    @action(_('Add course ticket'))
    928928    def addCourseTicket(self, **data):
    929         ticket = CourseTicket()
     929        ticket = createObject(u'waeup.CourseTicket')
    930930        course = data['course']
    931931        ticket.automatic = False
     
    18921892        if self.context.getStudent().state != PAID:
    18931893            return
    1894         ticket = CourseTicket()
     1894        ticket = createObject(u'waeup.CourseTicket')
    18951895        course = data['course']
    18961896        for name in ['code', 'title', 'credits', 'passmark', 'semester']:
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py

    r8323 r8325  
    2222import grok
    2323from zope.component.interfaces import IFactory
     24from zope.component import createObject
    2425from zope.interface import implementedBy
    2526from waeup.kofa.students.interfaces import (
     
    5859                if val.level != studylevel.level:
    5960                    continue
    60                 ticket = CourseTicket()
     61                ticket = createObject(u'waeup.CourseTicket')
    6162                ticket.code = val.getCourseCode()
    6263                ticket.automatic = True
     
    8687                            # Carry-over ticket exists
    8788                            continue
    88                         co_ticket = CourseTicket()
     89                        co_ticket = createObject(u'waeup.CourseTicket')
    8990                        for name in ['code', 'title', 'credits', 'passmark',
    9091                                     'semester', 'mandatory',
Note: See TracChangeset for help on using the changeset viewer.