Ignore:
Timestamp:
31 Jul 2009, 14:48:53 (15 years ago)
Author:
uli
Message:

Make course field 'semester' a choice of three given values.

File:
1 edited

Legend:

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

    r4482 r4506  
    33from zope.interface import Interface, Attribute
    44from zope import schema
     5from zope.schema.vocabulary import SimpleVocabulary
    56from waeup.permissions import RoleSource
    67
     
    137138    level = schema.Int(
    138139        title = u'Level',
    139         default = None,
     140        default = 100,
    140141        required = False,
    141142        )
     
    153154        )
    154155
    155     semester = schema.Int(
    156         title = u'Semester',
    157         default = 1,
    158         required = True,
    159         )
     156    semester = schema.Choice(
     157        title = u'Semester/Term',
     158        default = 2,
     159        vocabulary = SimpleVocabulary.fromItems([
     160                ('First Semester', 1),('Second Semester', 2),
     161                ('Combined', 3)]),
     162        #values = [],
     163        required = True,
     164        )
     165
    160166
    161167class ICertificate(IWAeUPObject):
Note: See TracChangeset for help on using the changeset viewer.