Index: /waeup/branches/ulif-rewrite/src/waeup/interfaces.py
===================================================================
--- /waeup/branches/ulif-rewrite/src/waeup/interfaces.py	(revision 4558)
+++ /waeup/branches/ulif-rewrite/src/waeup/interfaces.py	(revision 4559)
@@ -1,4 +1,7 @@
 ##
 ## interfaces.py
+from zc.sourcefactory.basic import BasicSourceFactory
+from zope.component import getUtility
+from zope.app.catalog.interfaces import ICatalog
 from zope.interface import Interface, Attribute
 from zope import schema
@@ -12,4 +15,19 @@
     return SimpleVocabulary([
             SimpleTerm(value, value, title) for title, value in terms])
+
+
+class CourseSource(BasicSourceFactory):
+    """A course source delivers all courses inside the portal by looking
+       up a catalog.
+    """
+    catalog = None
+    def getValues(self):
+        if self.catalog is None:
+            self.catalog = getUtility(ICatalog, name='courses_catalog')
+        result = list(self.catalog.searchResults(code=('', 'z*')))
+        
+    def getTitle(self, value):
+        return "%s %s" % (value.code, value.title[:32])
+
 
 class IWAeUPObject(Interface):
@@ -228,4 +246,5 @@
     
 
+    
 class ICertificateContainer(IWAeUPContainer):
     """A container for certificates.
@@ -238,8 +257,12 @@
 
 class ICertificateCourse(IWAeUPObject):
-    """A course as part of a certificate.
-    """
-    course = Attribute("A course instance.")
-
+    """A certificatecourse is a course referenced by a certificate, which
+       provides some own attributes.
+    """
+    course = schema.Choice(
+        title = u'Course',
+        source = CourseSource(),
+        )
+    
     level = schema.Int(
         title = u'Level of this course',
