Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 5976)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 5977)
@@ -1184,4 +1184,8 @@
             if a['level'] > b['level']:
                 return 1
+            if a['semester'] < b['semester']:
+                return -1
+            if a['semester'] > b['semester']:
+                return 1                
             if a['mandatory'] != b['mandatory']:
                 if a['mandatory'] == False and b['mandatory'] == True:
@@ -1196,17 +1200,17 @@
         entries = []
         levels = dict()
-        for key, course in self.context.items():
-            certcourse = self.context[key]
+        for key, certcourse in self.context.items():
             course = certcourse.course
             level = certcourse.level
             mandatory = certcourse.core_or_elective
             title = course.title
-            code = course.code
-            course_url = self.url(self.context[key])
+            courseref_url = self.url(self.context[key])
+            course_url = self.url(course)
             semester = course.semester
 
             new_entry = dict(
-                level=level, mandatory=mandatory, url=course_url,
-                title=title, code=code, semester=semester)
+                level=level, mandatory=mandatory, url=courseref_url,
+                title=title, semester=semester, course=course, code=key,
+                course_url=course_url)
             if str(level) not in levels.keys():
                 levels[str(level)] = dict()
@@ -1278,5 +1282,5 @@
     @property
     def title(self):
-        return 'Course Reference: %s' % (self.context.course.code)
+        return 'Course Referrer: %s' % (self.context.__name__)
 
 class CertificateCourseFormPage(WAeUPEditFormPage):
@@ -1291,5 +1295,5 @@
     @property
     def title(self):
-        return 'Edit course reference'
+        return 'Edit course referrer'
     
     @grok.action('Save and return')
@@ -1321,16 +1325,16 @@
     form_fields = grok.AutoFields(ICertificateCourseAdd)
     pnav = 1
-    title = 'Add course reference'
-
-    @grok.action('Add course reference')
+    title = 'Add course referrer'
+
+    @grok.action('Add course referrer')
     def addCertcourse(self, **data):
         try:
             self.context.addCourseRef(**data)
         except KeyError:
-            self.status = Invalid('The chosen course reference is already part of'
+            self.status = Invalid('The chosen course referrer is already part of'
                                   'this certificate')
             return
         except DuplicationError:
-            self.status = Invalid('The chosen course reference is already part of'
+            self.status = Invalid('The chosen course referrer is already part of'
                                   'this certificate')
             return
Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatecoursepage.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatecoursepage.pt	(revision 5976)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatecoursepage.pt	(revision 5977)
@@ -1,3 +1,3 @@
-<h2 tal:content="context/course/code">TITLE</h2>
+<h2 tal:content="context/__name__">TITLE</h2>
 
 <table class="listing">
@@ -6,5 +6,5 @@
   <tbody>
     <tr class="odd">
-      <td>Reference Code:</td>
+      <td>Code:</td>
       <td tal:content="context/__name__">CODE</td>
     </tr>  
Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt	(revision 5976)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt	(revision 5977)
@@ -1,29 +1,29 @@
 <h2 tal:content="context/title">TITLE</h2>
 
-<table class="listing">
+<table class="zebra">
   <thead>
   </thead>
   <tbody>
-    <tr class="odd">
+    <tr>
       <td>Code:</td>
       <td tal:content="context/__name__">CODE</td>
     </tr>   
-    <tr class="even">
+    <tr>
       <td>Title:</td>
       <td tal:content="context/title">THE TITLE</td>
     </tr>
-    <tr class="odd">
+    <tr>
       <td>Start Level:</td>
       <td tal:content="context/start_level">START_LEVEL</td>
     </tr>
-    <tr class="even">
+    <tr>
       <td>End Level:</td>
       <td tal:content="context/end_level">END_LEVEL</td>
     </tr>
-    <tr class="odd">
+    <tr>
       <td>Study Mode:</td>
       <td tal:content="context/study_mode">STUDY_MODE</td>
     </tr>
-    <tr class="even">
+    <tr>
       <td>Application Category:</td>
       <td tal:content="context/application_category">APPLICATION_CATEGORY</td>
@@ -32,51 +32,41 @@
 </table>
 
-<h3>Courses</h3>
+<h3><span tal:content="context/__name__">Code</span> Course Referrers</h3>
 
+    <table class="zebra">
+      <thead>
+        <tr>
+          <th>Course Referrer</th>
+          <th>Course</th>
+          <th>Title</th>
+          <th>Level</th>
+          <th>Semester</th>
+          <th>Mandatory</th>
+          <th>&nbsp;</th>
+        </tr>      
+      </thead>    
+      <tbody>
+      <span tal:omit-tag="" tal:repeat="level python: sorted(view.getCourseList().items())">
+      <span tal:omit-tag="" tal:repeat="semester python: sorted(level[1].items())">
+      <tr tal:repeat="courseref python:semester[1]">
+        <td> <a href="" tal:attributes="href courseref/url" tal:content="courseref/code">courseref code</a></td>
+        <td> <a href="" tal:attributes="href courseref/course_url" tal:content="courseref/course/code">course code</a></td>
+        <td tal:content="courseref/title">title</td>
+        <td tal:content="python:level[0]">level</td>
+        <td tal:content="python:semester[0]">semester</td>
+        <td tal:content="courseref/mandatory">mandatory</td>
+        <td>
+            <form method="POST">
+              <input type="hidden" name="code" 
+            	 value="" tal:attributes="value courseref/course/code" />
+              <input type="hidden" name="level" 
+            	 value="" tal:attributes="value python:level[0]" />
+              <input type="submit" name="delcourse" value="delete" />
+             </form>        
+        </td>
+      </tr>
+      </span>
+      </span>
+      </tbody>
+    </table>
 
-<div tal:repeat="level python: sorted(view.getCourseList().items())">
-  <b>
-    Level <span tal:replace="python: level[0]">100</span>
-  </b>
-
-  <div tal:repeat="semester python: sorted(level[1].items())">
-    <div tal:condition="python: semester[0] == '0'">
-      &nbsp;&nbsp;Untimed courses
-    </div>
-    <div tal:condition="python: semester[0] == '1'">
-      &nbsp;&nbsp;First semester
-    </div>
-    <div tal:condition="python: semester[0] == '2'">
-      &nbsp;&nbsp;Second semester
-    </div>
-    <div tal:condition="python: semester[0] == '3'">
-      &nbsp;&nbsp;Combined
-    </div>
-    
-    <div tal:repeat="course python:semester[1]">
-      &nbsp;&nbsp;&nbsp;&nbsp;
-	<form method="POST">
-	  <input type="hidden" name="code" 
-		 value="" tal:attributes="value course/code" />
-	  <input type="hidden" name="level" 
-		 value="" tal:attributes="value python:level[0]" />
-	  <input type="submit" name="delcourse" value="delete" />
-
-      <a href="" 
-	 tal:attributes="href course/url"
-	 ><span tal:content="course/code">code</span>
-      </a>
-      <span tal:content="course/title">title</span>
-      <span tal:condition="course/mandatory">
-	[mandatory]
-      </span>
-      <span tal:condition="not: course/mandatory">
-	[optional]
-      </span>
-	</form>
-    </div>
-  </div>
-
-</div>
-
-
Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 5976)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 5977)
@@ -344,5 +344,5 @@
     grok.context(ICertificateCourse)
     grok.view(CertificateCoursePage)
-    text = 'Edit course reference'
+    text = 'Edit course referrer'
 
 #
@@ -384,5 +384,5 @@
     grok.view(CertificatePage)
     grok.order(4)
-    text = 'Add course reference'
+    text = 'Add course referrer'
     target = 'addcertificatecourse'
 
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py	(revision 5976)
+++ main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py	(revision 5977)
@@ -58,5 +58,5 @@
     
     def addCourseRef(self, course, level=100, core_or_elective=True):
-        """Add a course reference.
+        """Add a course referrer.
         """
         code = "%s_%s" % (course.code, level)
@@ -67,5 +67,5 @@
 
     def delCourseRef(self, code, level=None):
-        """Delete a course reference denoted by its code.
+        """Delete a course referrer denoted by its code.
         """
         for key in self.keys():
@@ -122,10 +122,10 @@
 @grok.subscribe(ICourse, grok.IObjectRemovedEvent)
 def removedCourseHandler(course, event):
-    """If a course is deleted, we make sure that also references in a
+    """If a course is deleted, we make sure that also referrers in a
        certificatecontainer are removed.
     """
     code = course.code
 
-    # Find all certcourses that reference the given course...
+    # Find all certificatecourses that refer to given course...
     try:
         cat = getUtility(ICatalog, name='certcourses_catalog')
@@ -136,5 +136,5 @@
     results = cat.searchResults(course_code=(code, code))
     for certcourse in results:
-        # Remove that reference...
+        # Remove that referrer...
         cert = certcourse.__parent__
         cert.delCourseRef(code)
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py	(revision 5976)
+++ main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py	(revision 5977)
@@ -1,29 +1,10 @@
 """Interfaces of academics specific objects.
 """
-from zc.sourcefactory.basic import BasicSourceFactory
 from zope import schema
-try:
-    from zope.catalog.interfaces import ICatalog
-except ImportError:
-    # BBB
-    from zope.app.catalog.interfaces import ICatalog
-from zope.component import getUtility
 from zope.interface import Attribute
-from waeup.sirp.interfaces import (IWAeUPObject, IWAeUPContainer,
-                                   SimpleWAeUPVocabulary)
-
-class CourseSource(BasicSourceFactory):
-    """A course source delivers all courses inside the portal by looking
-       up a catalog.
-    """
-    def getValues(self):
-        catalog = getUtility(ICatalog, name='courses_catalog')
-        return list(catalog.searchResults(code=('', 'z*')))
-
-    def getToken(self, value):
-        return value.code
-        
-    def getTitle(self, value):
-        return "%s - %s" % (value.code, value.title[:64])
+from waeup.sirp.interfaces import (IWAeUPObject, IWAeUPContainer)
+                                   
+from waeup.sirp.university.vocabularies import (course_levels,
+                                                semester, CourseSource)                                   
 
 class IFaculty(IWAeUPContainer):
@@ -151,7 +132,5 @@
         title = u'Semester/Term',
         default = 0,
-        vocabulary = SimpleWAeUPVocabulary(
-            ('N/A', 0), ('First Semester', 1),
-            ('Second Semester', 2), ('Combined', 3)),
+        vocabulary = semester,
         required = True,
         )
@@ -199,13 +178,17 @@
         )
 
-    start_level = schema.TextLine(
+    start_level = schema.Choice(
         title = u'Start Level',
-        default = u'100',
-        required = True,
-        )
-    
-    end_level = schema.TextLine(
+        #source = LevelSource(),
+        vocabulary = course_levels,
+        default = 100,
+        required = True,
+        )
+    
+    end_level = schema.Choice(
         title = u'End Level',
-        default = u'500',
+        #source = LevelSource(),
+        vocabulary = course_levels,
+        default = 500,
         required = True,
         )
@@ -240,17 +223,18 @@
 
 class ICertificateCourse(IWAeUPObject):
-    """A certificatecourse is a course referenced by a certificate, which
+    """A certificatecourse is referring a course and 
        provides some own attributes.
     """
     course = schema.Choice(
-        title = u'Course referenced',
+        title = u'Course referrer',
         source = CourseSource(),
         readonly = True,
         )
     
-    level = schema.Int(
+    level = schema.Choice(
         title = u'Level',
         required = True,
-        default = 100,
+        #source = LevelSource(),
+        vocabulary = course_levels,
         readonly = False,
         )
@@ -263,5 +247,5 @@
 
     def getCourseCode():
-        """Return the code of the referenced course.
+        """Return the code of the course referred to.
 
         This is needed for cataloging.
@@ -270,9 +254,9 @@
         
 class ICertificateCourseAdd(ICertificateCourse):
-    """A certificatecourse is a course referenced by a certificate, which
+    """A certificatecourse is referring a course and 
        provides some own attributes.
     """
     course = schema.Choice(
-        title = u'Course to be referenced',
+        title = u'Course',
         source = CourseSource(),
         readonly = False,
Index: main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py	(revision 5977)
+++ main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py	(revision 5977)
@@ -0,0 +1,39 @@
+from waeup.sirp.interfaces import SimpleWAeUPVocabulary
+from zc.sourcefactory.basic import BasicSourceFactory
+try:
+    from zope.catalog.interfaces import ICatalog
+except ImportError:
+    # BBB
+    from zope.app.catalog.interfaces import ICatalog
+from zope.component import getUtility
+                                   
+course_levels = SimpleWAeUPVocabulary(
+              ('Year 1 (100)',100),
+              ('Year 2 (200)',200),
+              ('Year 3 (300)',300),
+              ('Year 4 (400)',400),
+              ('Year 5 (500)',500),
+              ('Year 6 (600)',600),
+              ('Year 7 (700)',700),
+              ('Year 8 (800)',800),
+              )
+              
+semester = SimpleWAeUPVocabulary(
+            ('N/A', 0), ('First Semester', 1),
+            ('Second Semester', 2), ('Combined', 3))              
+              
+class CourseSource(BasicSourceFactory):
+    """A course source delivers all courses inside the portal by looking
+       up a catalog.
+    """
+    def getValues(self):
+        catalog = getUtility(ICatalog, name='courses_catalog')
+        return sorted(list(catalog.searchResults(code=('', 'z*'))),key=lambda value: value.code)
+
+    def getToken(self, value):
+        return value.code
+        
+    def getTitle(self, value):
+        return "%s - %s" % (value.code, value.title[:64])
+        
+                                                             
