Index: waeup_product/trunk/skins/waeup_faculty/create_certificate.py
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/create_certificate.py	(revision 256)
+++ waeup_product/trunk/skins/waeup_faculty/create_certificate.py	(revision 256)
@@ -0,0 +1,50 @@
+##parameters=REQUEST=None
+# $Id: create_course.py 145 2005-11-03 08:53:17Z joachim $
+"""
+Create a Course
+
+"""
+type_name = 'Certificate'
+REQUEST.set('type_name',type_name)
+
+ti = context.portal_types[type_name]
+pr = context.portal_registration
+pm = context.portal_membership
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+
+res,psm,ds = lt.renderLayout(layout_id= 'certificate',
+                      schema_id = 'certificate',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'create_certificate',
+                      )
+if  psm == 'invalid':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'Please correct your errors',
+                                 )
+elif psm == '':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = psm,
+                                 )
+    
+elif psm == 'valid':
+    oid = "%s" % ds.get('code').replace(' ','')
+    context.invokeFactory(type_name,oid) 
+    object = getattr(context,oid)
+    ds.set('Title',ds.get('heading'))
+    object.getContent().edit(mapping=ds,proxy=object)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created' % oid
+    context_ti = context.portal_types[context.portal_type] 
+    index = context_ti.getActionById('view','university_view')
+    return getattr(context,index)(psm=psm)
+
Index: waeup_product/trunk/skins/waeup_faculty/get_departments_voc.py
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/get_departments_voc.py	(revision 238)
+++ waeup_product/trunk/skins/waeup_faculty/get_departments_voc.py	(revision 256)
@@ -6,13 +6,16 @@
 """
 #academics = context.sections.portal.academics
-academics = context.portal_catalog(id = 'academics')[0].getObject()
-faculties = [f for f in context.filterContents(items=academics.contentValues()) if f.portal_type == 'Faculty']
+#academics = context.portal_catalog(id = 'academics')[0].getObject()
+#faculties = [f for f in context.filterContents(items=academics.contentValues()) if f.portal_type == 'Faculty']
 
-deplist = []
-for faculty in faculties:
-    departments = [d for d in context.filterContents(items=faculty.contentValues()) if d.portal_type == 'Department']
-    deplist.extend(departments)
-if not key:
-    return [(d.getId(),d.title_or_id(),) for d in deplist]
-return [d.title_or_id() for d in deplist if d.getId() == key][0]
-return [(d.getId(),d.title_or_id()) for d in deplist if d.getId() == key]
+#return res
+#return [(d.id,d.Title,) for d in res]
+if key is None:
+    res = context.portal_catalog({'meta_type': "Department"})    
+    return [(d.getId,d.Title,) for d in res]
+res = context.portal_catalog({'meta_type': "Department", 'id': key}) 
+return res[-1].Title
+return [(d.getId,d.title_or_id(),) for d in res][-1]
+
+#return [d.title_or_id() for d in deplist if d.getId() == key][0]
+#return [(d.getId(),d.title_or_id()) for d in deplist if d.getId() == key]
Index: waeup_product/trunk/skins/waeup_faculty/level_view.py
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/level_view.py	(revision 256)
+++ waeup_product/trunk/skins/waeup_faculty/level_view.py	(revision 256)
@@ -0,0 +1,13 @@
+##parameters=psm=None
+# $Id: temporary_view_all.py 197 2006-02-08 12:47:31Z joachim $
+
+"""
+"""
+
+member = context.portal_membership.getAuthenticatedMember()
+uname = str(member)
+roles = member.getRoles()
+cat = context.portal_catalog
+request = context.REQUEST
+url0 = request.get('URL0')
+return context.level_view_form()
Index: waeup_product/trunk/skins/waeup_faculty/level_view_form.pt
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/level_view_form.pt	(revision 256)
+++ waeup_product/trunk/skins/waeup_faculty/level_view_form.pt	(revision 256)
@@ -0,0 +1,49 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="roles member/getRoles;
+               backend python:'UniversityManager' in roles or 'StudentManager' in roles;
+               frontend python:'Student' in roles or isAnon;
+               folder here/getContent;
+               items python:context.filterContents(items=context.contentValues());"
+               >
+    <h1>Level  <span tal:content="context/title_or_id" /></h1>      
+  
+    <p>The courses for this level:</p>
+    <tal:block condition="python: len(items)">  
+      <table>
+        <span tal:repeat="item items">
+          <span tal:define="courses python:item.filterContents(items=item.contentValues())">
+          <tr>
+            <th> <span tal:content="item/id" tal:omit-tag="" /> Semester
+            </th>
+          </tr>
+         <tr tal:repeat="course courses">
+            <td tal:content="course/id">
+            </td>
+            <td tal:content="course/Title">
+            </td>
+          </tr>
+            <tr> <td></td></tr>
+        </span>
+        </span>
+      </table>
+    </tal:block>
+    
+    <tal:block condition="python: not len(items)">
+        (No Courses yet!)
+    </tal:block>
+  
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
