Changeset 7664 for main


Ignore:
Timestamp:
17 Feb 2012, 09:10:47 (13 years ago)
Author:
Henrik Bettermann
Message:

Carry-over course registration is optional and can now be switched on and off in the configuration.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py

    r7619 r7664  
    467467        )
    468468
     469    carry_over = schema.Bool(
     470        title = u'Carry-over Course Registration',
     471        default = False,
     472        )
     473
    469474class ISessionConfiguration(ISIRPObject):
    470475    """A session configuration object.
  • main/waeup.sirp/trunk/src/waeup/sirp/students/studycourse.py

    r7661 r7664  
    6666                self[str(studylevel.level)][ticket.code] = ticket
    6767        # Collect carry-over courses in base levels (not in repeating levels)
    68         if studylevel.level % 100 == 0:
     68        try:
     69            co_enabled = grok.getSite()['configuration'].carry_over
     70        except TypeError:
     71            # In tests we might not have a site object
     72            co_enabled = True
     73        if co_enabled and studylevel.level % 100 == 0:
    6974            levels = sorted(self.keys())
    7075            index = levels.index(str(studylevel.level))
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r7661 r7664  
    169169        self.app['configuration'].accommodation_states = ['admitted']
    170170        self.app['configuration'].accommodation_session = 2004
     171        self.app['configuration'].carry_over = True
    171172        configuration = SessionConfiguration()
    172173        # These attributes must also exist in the customization packages.
Note: See TracChangeset for help on using the changeset viewer.