Changeset 4254


Ignore:
Timestamp:
12 Jun 2009, 08:21:43 (16 years ago)
Author:
uli
Message:

Add interfaces for course/course container and require courses for departments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/interfaces.py

    r4247 r4254  
    5555        required = True,
    5656        )
    57    
     57
    5858class IFacultyContainer(IWAeUPContainer):
    5959    """A container for faculties.
     
    105105        )
    106106
    107        
     107    courses = Attribute("A container for courses.")
     108
     109class ICourseContainer(IWAeUPContainer):
     110    """A container for faculties.
     111    """
     112    def addCourse(faculty):
     113        """Add an ICourse object.
     114
     115        Returns the key, under which the object was stored.
     116        """
     117
     118class ICourse(IWAeUPObject):
     119    """Representation of a course.
     120    """
     121    code = schema.TextLine(
     122        title = u'Code',
     123        default = u'NA',
     124        description = u'Abbreviated code of the department',
     125        required = True,
     126        )
     127
     128    title = schema.TextLine(
     129        title = u'Title of course',
     130        default = u'Unnamed',
     131        required = True,
     132        )
     133
     134    level = schema.Int(
     135        title = u'Level',
     136        default = None,
     137        required = False,
     138        )
     139
     140    passmark = schema.Int(
     141        title = u'Passmark',
     142        default = 40,
     143        required = True,
     144        )
     145
     146    semester = schema.Int(
     147        title = u'Semester',
     148        default = 1,
     149        required = True,
     150        )
     151
     152
    108153class IWAeUPExporter(Interface):
    109154    """An exporter for objects.
Note: See TracChangeset for help on using the changeset viewer.