Ignore:
Timestamp:
14 Sep 2011, 21:14:05 (13 years ago)
Author:
Henrik Bettermann
Message:

Add StudentStudyLevel? container class. These containers will contain the course tickets. The study level containers correspond with the the 'course lists' which have to be registered at the beginning of each session.

  • work in progress -
File:
1 edited

Legend:

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

    r6642 r6774  
    2222from zope.component.interfaces import IFactory
    2323from waeup.sirp.students.interfaces import (
    24     IStudentStudyCourse, IStudentNavigation)
     24    IStudentStudyCourse, IStudentNavigation, IStudentStudyLevel)
    2525from waeup.sirp.utils.helpers import attrs_to_fields
    2626
     
    3838        return self.__parent__
    3939
     40    def addStudentStudyLevel(self, studylevel):
     41        """Add a study level object.
     42        """
     43        if not IStudentStudyLevel.providedBy(studylevel):
     44            raise TypeError(
     45                'StudentStudyCourses contain only IStudentStudyLevel instances')
     46        self[studylevel.level] = studylevel
     47        return
     48
    4049StudentStudyCourse = attrs_to_fields(StudentStudyCourse)
Note: See TracChangeset for help on using the changeset viewer.