Index: /waeup_product/trunk/Academics.py
===================================================================
--- /waeup_product/trunk/Academics.py	(revision 255)
+++ /waeup_product/trunk/Academics.py	(revision 256)
@@ -17,34 +17,34 @@
 #registerDirectory('skins/waeup_faculty', globals())
 
-class SCFolder(CPSDocument): ###(
+##class SCFolder(CPSDocument): ###(
+##    """
+##    WAeUP StudyCourseFolder containing StudyCourses 
+##    """
+##    meta_type = 'SCFolder'
+##    portal_type = meta_type
+##    security = ClassSecurityInfo()
+##    
+##    def __init__(self, id, **kw):
+##        CPSDocument.__init__(self, id, **kw)
+##
+##    security.declareProtected(View,"Title")
+##    def Title(self):
+##        """compose title"""
+##        return "SCFolder of %s" % (self.title)
+##
+##InitializeClass(SCFolder)
+##
+##def addSCFolder(container, id, REQUEST=None, **kw):
+##    """Add a SCFolder."""
+##    ob = SCFolder(id, **kw)
+##    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+##
+#####)
+
+class Certificate(CPSDocument): ###(
     """
-    WAeUP StudyCourseFolder containing StudyCourses 
+    WAeUP Certificate 
     """
-    meta_type = 'SCFolder'
-    portal_type = meta_type
-    security = ClassSecurityInfo()
-    
-    def __init__(self, id, **kw):
-        CPSDocument.__init__(self, id, **kw)
-
-    security.declareProtected(View,"Title")
-    def Title(self):
-        """compose title"""
-        return "SCFolder of %s" % (self.title)
-
-InitializeClass(SCFolder)
-
-def addSCFolder(container, id, REQUEST=None, **kw):
-    """Add a SCFolder."""
-    ob = SCFolder(id, **kw)
-    return CPSBase_adder(container, ob, REQUEST=REQUEST)
-
-###)
-
-class StudyCourse(CPSDocument): ###(
-    """
-    WAeUP StudyCourse 
-    """
-    meta_type = 'StudyCourse'
+    meta_type = 'Certificate'
     portal_type = meta_type
     security = ClassSecurityInfo()
@@ -56,13 +56,40 @@
 ##    def Title(self):
 ##        """compose title"""
-##        return "StudyCourse of %s" % (self.title)
+##        return "Certificate of %s" % (self.title)
 
-InitializeClass(StudyCourse)
+InitializeClass(Certificate)
 
-def addStudyCourse(container, id, REQUEST=None, **kw):
-    """Add a StudyCourse."""
-    ob = StudyCourse(id, **kw)
+def addCertificate(container, id, REQUEST=None, **kw):
+    """Add a Certificate."""
+    ob = Certificate(id, **kw)
     return CPSBase_adder(container, ob, REQUEST=REQUEST)
 
+###)
+
+class CertificateCourse(CPSDocument): ###(
+    """
+    WAeUP CertificateCourse  
+    """
+    meta_type = 'CertificateCourse'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+    
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        res = self.portal_catalog({'meta_type': "Course",
+                                           'id': self.id})
+        if res:
+            course = res[-1].getObject()  
+        else:
+            return "No course for %s" % self.id
+        return "%s" % (course.title)
+
+InitializeClass(CertificateCourse)
+
+def addCertificateCourse(container, id, REQUEST=None, **kw):
+    """Add a CertificateCourse."""
+    ob = CertificateCourse(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
 ###)
 
@@ -150,2 +177,3 @@
     return CPSBase_adder(container, ob, REQUEST=REQUEST)
 ###)
+
Index: /waeup_product/trunk/WAeUPPermissions.py
===================================================================
--- /waeup_product/trunk/WAeUPPermissions.py	(revision 255)
+++ /waeup_product/trunk/WAeUPPermissions.py	(revision 256)
@@ -20,52 +20,16 @@
 __author__ = "Joachim Schmitz <js@aixtraware.de>"
 
-"""WAeUP Student Permissions
+"""WAeUP Permissions
 """
 
-from AccessControl import ModuleSecurityInfo
+#from AccessControl import ModuleSecurityInfo
 from Products.CMFCore.permissions import setDefaultRoles
-security = ModuleSecurityInfo('Products.WAeUP.WAeUPPermissions')
+#security = ModuleSecurityInfo('Products.WAeUP.WAeUPPermissions')
 
-#  - 'University Manage' : Permission you need to manage a University
+#  - 'Certificat Course delete' : Permission you need to ..
 #
-security.declarePublic('UniversityManage')
-UniversityManage = "University Manage"
-setDefaultRoles(UniversityManage, ('Manager', 
-                                   ))
-#  - 'Student Manage' : Permission you need to manage Students
-#
-security.declarePublic('StudentManage')
-StudentManage = "Student Manage"
-setDefaultRoles(StudentManage, ('Manager', 
-                                'UniversityManager', 
-                                'StudentManager', 
-                                'FacultyManager', 
-                                'Owner',))
-#  - 'Faculty Manage' : Permission you need to manage a Faculty
-#
-security.declarePublic('FacultyManage')
-FacultyManage = "Faculty Manage"
-setDefaultRoles(FacultyManage, ('Manager', 
-                                'UniversityManager', 
-                                'FacultyManager', 
-                                ))
-#  - 'Department Manage' : Permission you need to manage a Department
-#
-security.declarePublic('DepartmentManage')
-DepartmentManage = "Department Manage"
-setDefaultRoles(DepartmentManage, ('Manager', 
-                                   'UniversityManager', 
-                                   'FacultyManager', 
-                                   'DepartmentManager', 
-                                   ))
-#  - 'Course Manage' : Permission you need to manage a Department
-#
-security.declarePublic('CourseManage')
-CourseManage = "Course Manage"
-setDefaultRoles(CourseManage, ('Manager', 
-                               'UniversityManager', 
-                               'FacultyManager', 
-                               'DepartmentManager', 
-                               'CourseManager', 
+CertificateCourseDelete = "Certificate Course Delete"
+setDefaultRoles(CertificateCourseDelete, ('Manager', 
+                               'CourseAdvisor', 
                                ))
 
Index: /waeup_product/trunk/__init__.py
===================================================================
--- /waeup_product/trunk/__init__.py	(revision 255)
+++ /waeup_product/trunk/__init__.py	(revision 256)
@@ -11,13 +11,16 @@
 from Products.CPSCore.interfaces import ICPSSite
 
+import Products.WAeUP.WAeUPPermissions
 from Products.WAeUP.University import University, addUniversity
 from Products.WAeUP.Accommodation import AccoFolder, addAccoFolder
 from Products.WAeUP.Accommodation import Accommodation, addAccommodation
-from Products.WAeUP.Academics import SCFolder, addSCFolder
-from Products.WAeUP.Academics import StudyCourse, addStudyCourse
+#from Products.WAeUP.Academics import SCFolder, addSCFolder
+from Products.WAeUP.Academics import Certificate, addCertificate
+from Products.WAeUP.Academics import CertificateCourse, addCertificateCourse
 from Products.WAeUP.Academics import Faculty, addFaculty
 from Products.WAeUP.Academics import Department, addDepartment
 from Products.WAeUP.Academics import Course, addCourse
 from Products.WAeUP.Academics import CourseTicket, addCourseTicket
+from Products.WAeUP.Academics import CertificateCourse, addCertificateCourse
 from Products.WAeUP.Students import Student, addStudent
 from Products.WAeUP.Students import StudentPersonal, addStudentPersonal
@@ -33,10 +36,12 @@
 contentClasses = (
     University,
-    SCFolder,
-    StudyCourse,
+    #SCFolder,
+    Certificate,
+    CertificateCourse,
     Faculty,
     Department,
     Course,
     CourseTicket,
+    CertificateCourse,
     AccoFolder,
     Accommodation,
@@ -52,10 +57,12 @@
 contentConstructors = (
     addUniversity,
-    addSCFolder,
-    addStudyCourse,
+    #addSCFolder,
+    addCertificate,
+    addCertificateCourse,
     addFaculty,
     addDepartment,
     addCourse,
     addCourseTicket,
+    addCertificateCourse,
     addAccoFolder,
     addAccommodation,
@@ -71,10 +78,12 @@
 fti = (
     {}, # University
-    {}, #SCFolder
-    {}, #StudyCourse
+    #{}, #SCFolder
+    {}, #Certificate
+    {}, #CertificateCourse
     {}, # Faculty
     {}, # Department
     {}, # Course
     {}, # CourseTicket
+    {}, # CertificateCourse
     {}, # AccoFolder
     {}, # Accommodation
Index: /waeup_product/trunk/exportimport.py
===================================================================
--- /waeup_product/trunk/exportimport.py	(revision 255)
+++ /waeup_product/trunk/exportimport.py	(revision 256)
@@ -132,25 +132,38 @@
 def loadFacultiesFromCSV(academics,site,context): ###(
     """install Universityspecific Faculies from CSV values"""
+    #return
     logger = context.getLogger('loadfaculties')
+    logger.info('Start loading Faculties')
     faculties = csv.DictReader(open("%s/import/faculty.csv" % i_home,"rb"))
+    l = site.portal_catalog({'meta_type': "Faculty"})
+    facs = {}
+    for f in l:
+        facs[f.id] = f.getObject()
     for faculty in faculties:
-        fid = faculty['FacultyKey']
-        f = getattr(academics,fid,None)
+        logger.info('processing %(Session)s %(FacultyCode)s %(Description)s %(CollegeCode)s %(FacultyKey)s %(Status)s %(degree_grade)s %(Bankcode)s' % faculty)
+        fid = faculty['FacultyCode']
+        f = facs.get(fid,None)
         if f is None:
             #self.log('Creating Faculty %(id)s = %(Title)s' % faculty)
-            logger.info('Creating Faculty %(FacultyKey)s = %(Description)s' % faculty)
+            logger.info('Creating Faculty with ID %(FacultyCode)s %(Description)s' % faculty)
             academics.invokeFactory('Faculty', fid)
             f = getattr(academics,fid)
-            d = {'Title': faculty['Description']}
-            f.getContent().edit(mapping=d)
+        d = {'Title': faculty['Description']}
+        f.getContent().edit(mapping=d)
 ###)
 
 def loadDepartmentsFromCSV(academics,site,context): ###(
     """install Universityspecific Faculies from CSV values"""
+    #return
     logger = context.getLogger('loaddepartments')
     deps = csv.DictReader(open("%s/import/departments.csv" % i_home,"rb"))
+    l = site.portal_catalog({'meta_type': "Faculty"})
+    facs = {}
+    for f in l:
+        facs[f.id] = f.getObject()
     for dep in deps:
+        logger.info('Processing %(Session)s %(DeptCode)s %(Description)s %(FacultyCode)s' % dep)
         fid = dep['FacultyCode']
-        f = getattr(academics,fid,None)
+        f = facs.get(fid,None)
         if f is None:
             logger.info( "No Faculty with ID: %s" % fid)
@@ -158,31 +171,49 @@
             did = dep.get('DeptCode')
             d = getattr(f,did,None)
-            if d is None:
+            if d is None or d.portal_type == "Faculty":
                 #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
                 logger.info('Creating Department %(DeptCode)s = %(Description)s' % dep)
                 f.invokeFactory('Department', did)
                 d = getattr(f,did)
-                dict = {'Title': dep['Description']}
-                d.getContent().edit(mapping=dict)
+            dict = {'Title': dep['Description']}
+            d.getContent().edit(mapping=dict)
 ###)
 
 def loadCoursesFromCSV(academics,site,context): ###(
-    """install Universityspecific Faculies from CSV values"""
+    """install Universityspecific Courses from CSV values"""
+    #return
     logger = context.getLogger('loadcourses')
     courses = csv.DictReader(open("%s/import/courses.csv" % i_home,"rb"))
+    l = site.portal_catalog({'meta_type': "Faculty"})
+    facs = {}
+    for f in l:
+        facs[f.id] = f.getObject()
+    dl = site.portal_catalog({'meta_type': "Department"})
+    deps = {}
+    for d in dl:
+        deps[d.id] = d.getObject()
+    cl = site.portal_catalog({'meta_type': "Course"})
+    course_list = [ c.id for c in cl]
     for course in courses:
-        if course.get("FORMERCODE") != '':
-            continue
-        depid = course['Dept']
-        res = site.portal_catalog({'meta_type': "Department",
-                                      'id': depid})
-        if not res:
-            continue
-        dept=res[0].getObject()
+        logger.info('Processing %(CourseCode)s %(Description)s %(Credits)s %(Dept)s %(Semester)s %(Session)s %(PassMark)s %(CourseKey)s %(Category)s %(AdmStatus)s %(FORMERCODE)s' % course)
+        if course.get("FORMERCODE").endswith('BITS'):
+            continue
+        depid = course.get('Dept').upper()
+        if depid in deps.keys():
+            dept= deps.get(depid)
+        elif depid in facs.keys():
+            dept= facs.get(depid)
+        else:
+            logger.info("Dep %(Dept)s for Course %(CourseCode)s not found" % course)
+            continue
         course_id = ''.join(re.split('\W+',course.get('CourseCode')))
-        if len(course_id) != 6:
+        if len(course_id) == 3:
+            course_id = "%s000" % course_id
+        elif len(course_id) != 6:
             logger.info("invalid course_code %(CourseCode)s" % course)
             #print course_id,course.get('CourseCode'),course.get('Description')
             continue
+##        if course_id in course_list:
+##            continue
         c = getattr(dept,course_id,None)
         if c is None:
@@ -193,10 +224,251 @@
         dict = {'Title': course['Description']}
         dict['code'] = course_id
-        dict['credit'] = course.get('Credits')
-        #dict['level'] = course.get('CourseCode').split()[1][0]
-        dict['level'] = "%c00" % course_id[3]
-        dict['semester'] = "%(Semester)s" % course
+        dict['org_code'] = course.get('CourseCode') 
+        dict['credits'] = course.get('Credits')
+        dict['semester'] = course.get('Semester')
+        dict['session'] = course.get('Session')
+        dict['category'] = course.get('Category')
         dict['passmark'] = course.get('PassMark')
         c.getContent().edit(mapping=dict)
+###)
+
+def loadCertificatesFromCSV(site,context): ###(
+    """install Universityspecific Certificates from CSV values"""
+    #return
+    logger = context.getLogger('loadcertificates')
+    certificates = csv.DictReader(open("%s/import/certificates.csv" % i_home,"rb"))
+    f_ids = [f.id for f in site.portal_catalog({'meta_type': "Faculty"})]
+    #d_ids = [d.id for d in site.portal_catalog({'meta_type': "Department"})]
+    dl = site.portal_catalog({'meta_type': "Department"})
+    deps = {}
+    for d in dl:
+        deps[d.id] = d.getObject()
+    for certificate in certificates:
+        logger.info('Processing %(CertCode)s %(Description)s %(Faculty)s %(MaxPass)s %(MaxLoad)s %(session)s %(PromotionCredits)s %(Probationcredits)s %(StartLevel)s %(endLevel)s %(Nyears)s %(Ncore)s %(MaxElect)s %(MPREFIX)s %(Dept)s %(Admstatus)s %(category)s' % certificate)
+        depid = certificate.get('Dept')
+        facid = certificate.get('Faculty')
+        if facid not in f_ids:
+            logger.info('Faculty %(Faculty)s for %(CertCode)s %(Description)s not found' % certificate)
+            continue
+        if not deps.has_key(depid):
+            logger.info('Department %(Dept)s for %(CertCode)s %(Description)s not found' % certificate)
+            continue
+        certificate_id = "%(category)s_%(Admstatus)s_%(Dept)s" % certificate
+        dep = deps[depid]
+        c = getattr(dep,certificate_id,None)
+        if c is None:
+            #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
+            logger.info('Creating certificate %(CertCode)s  %(Description)s in Department %(Dept)s' % certificate)
+            dep.invokeFactory('Certificate', certificate_id)
+            c = getattr(dep,certificate_id)
+        dict = {'Title': certificate['Description']}
+        code = certificate.get('CertCode')
+        code = code.replace('.','')
+        code = code.replace('(','')
+        code = code.replace(')','')
+        code = code.replace('/','')
+        code = code.replace(' ','')
+        code = code.replace('_','')
+        dict['code'] = code
+        dict['faculty'] = certificate.get('Faculty') 
+        dict['department'] = certificate.get('Dept') 
+        dict['max_pass'] = certificate.get('MaxPass')
+        dict['max_load'] = certificate.get('MaxLoad')
+        dict['admin_status'] = certificate.get('Admstatus')
+        dict['category'] = certificate.get('category')
+        dict['m_prefix'] = certificate.get('MPREFIX')
+        dict['nr_years'] = int(certificate.get('Nyears'))
+        nc = certificate.get('Ncore','1')
+        try: 
+            dict['n_core'] = int(nc)
+        except:
+            dict['n_core'] = 1
+        dict['start_level'] = certificate.get('StartLevel')
+        dict['end_level'] = certificate.get('endLevel')
+        dict['promotion_credits'] = certificate.get('PromotionCredits')
+        dict['probation_credits'] = certificate.get('ProbationCredits')
+        c.getContent().edit(mapping=dict)
+###)
+
+def oldloadCertificatesFromCSV(certfolder,site,context): ###(
+    """install Universityspecific Certificates from CSV values"""
+    logger = context.getLogger('loadcertificates')
+    certificates = csv.DictReader(open("%s/import/certificates.csv" % i_home,"rb"))
+    f_ids = [f.id for f in site.portal_catalog({'meta_type': "Faculty"})]
+    d_ids = [d.id for d in site.portal_catalog({'meta_type': "Department"})]
+    for certificate in certificates:
+        depid = certificate.get('Dept')
+        facid = certificate.get('Faculty')
+        if facid not in f_ids:
+            logger.info('Faculty %(Faculty)s for %(CertCode)s %(Description)s not found' % certificate)
+            continue
+        if depid not in d_ids:
+            logger.info('Department %(Dept)s for %(CertCode)s %(Description)s not found' % certificate)
+            continue
+        certificate_id = "%(category)s_%(Admstatus)s_%(Dept)s" % certificate
+        c = getattr(certfolder,certificate_id,None)
+        if c is None:
+            #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
+            logger.info('Creating certificate %(CertCode)s  %(Description)s in Department %(Dept)s' % certificate)
+            certfolder.invokeFactory('Certificate', certificate_id)
+            c = getattr(certfolder,certificate_id)
+        dict = {'Title': certificate['Description']}
+        code = certificate.get('CertCode')
+        code = code.replace('.','')
+        code = code.replace('(','')
+        code = code.replace(')','')
+        code = code.replace('/','')
+        code = code.replace(' ','')
+        code = code.replace('_','')
+        dict['code'] = code
+        dict['faculty'] = certificate.get('Faculty') 
+        dict['department'] = certificate.get('Dept') 
+        dict['max_pass'] = certificate.get('MaxPass')
+        dict['max_load'] = certificate.get('MaxLoad')
+        dict['admin_status'] = certificate.get('Admstatus')
+        dict['category'] = certificate.get('category')
+        dict['m_prefix'] = certificate.get('MPREFIX')
+        dict['nr_years'] = int(certificate.get('Nyears'))
+        nc = certificate.get('Ncore','1')
+        try: 
+            dict['n_core'] = int(nc)
+        except:
+            dict['n_core'] = 1
+        dict['start_level'] = certificate.get('StartLevel')
+        dict['end_level'] = certificate.get('endLevel')
+        dict['promotion_credits'] = certificate.get('PromotionCredits')
+        dict['probation_credits'] = certificate.get('ProbationCredits')
+        c.getContent().edit(mapping=dict)
+###)
+
+def loadCertificateCoursesFromCSV(site,context): ###(
+    """install Certificate Courses from CSV values"""
+    return
+    logger = context.getLogger('loadcertificatecourses')
+    cert_courses = csv.DictReader(open("%s/import/course_level_courses.csv" % i_home,"rb"))
+    d_ids = [d.id for d in site.portal_catalog({'meta_type': "Department"})]
+    for cert_course in cert_courses:
+        logger.info('Processing %(CosCode)s %(CertCode)s %(CoreKey)s %(Session)s %(Level)s %(Core)s %(Elective)s %(Mandatory)s %(AdmStatus)s %(Dept)s %(Semester)s' % cert_course)
+        depid = cert_course.get('Dept')
+        code = cert_course.get('CertCode')
+        code = code.replace('.','')
+        code = code.replace('(','')
+        code = code.replace(')','')
+        code = code.replace('/','')
+        code = code.replace(' ','')
+        code = code.replace('_','')
+        if cert_course.get('Session') != '2002/2003':
+            continue
+        certificate = site.portal_catalog({'meta_type': "Certificate",
+                                           'SearchableText': code})
+        if not certificate:
+            print code
+            logger.info('CertCode %(CertCode)s for %(CosCode)s not found' % cert_course)
+            continue
+        certificate = certificate[-1].getObject()
+        certificate_code = certificate.getId()
+        if depid not in d_ids:
+            logger.info('Department %(Dept)s for %(CertCode)s not found' % cert_course)
+            continue
+        course_code = cert_course.get('CosCode')
+        level = cert_course.get('Level')
+        l = getattr(certificate,level,None)
+        if l is None:
+            #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
+            logger.info('Creating Level %(Level)s in certificate %(CertCode)s' % cert_course)
+            certificate.invokeFactory('StudyLevel', level)
+            l = getattr(certificate, level)
+            l.invokeFactory('Semester','first')
+            l.invokeFactory('Semester','second')
+        first_s = getattr(l,'first')
+        second_s = getattr(l,'second')
+        if cert_course.get('Semester') == '1':
+            semester = first_s
+        else:
+            semester = second_s
+        if hasattr(semester,course_code):
+            logger.info('Duplicate %(CosCode)s in Level %(Level)s' % cert_course)
+            continue
+            
+        semester.invokeFactory('CertificateCourse',course_code)
+        cc = getattr(semester,course_code)
+        dict = {}
+        dict['code'] = cert_course.get('CosCode')
+        dict['certificate_code'] = code
+        dict['certificate_code_org'] = cert_course.get('CertCode') 
+        dict['department'] = cert_course.get('Dept') 
+        dict['admin_status'] = cert_course.get('Admstatus')
+        dict['session'] = cert_course.get('Session')
+        if cert_course.get('Core') != '':
+            dict['core_or_elective'] = True
+        else:
+            dict['core_or_elective'] = False
+        dict['level'] = cert_course.get('Level')
+        cc.getContent().edit(mapping=dict)
+###)
+
+def old_loadCertificateCoursesFromCSV(certfolder,site,context): ###(
+    """install Certificate Courses from CSV values"""
+    return
+    logger = context.getLogger('loadcertificatecourses')
+    cert_courses = csv.DictReader(open("%s/import/course_level_courses.csv" % i_home,"rb"))
+    d_ids = [d.id for d in site.portal_catalog({'meta_type': "Department"})]
+    for cert_course in cert_courses:
+        depid = cert_course.get('Dept')
+        code = cert_course.get('CertCode')
+        code = code.replace('.','')
+        code = code.replace('(','')
+        code = code.replace(')','')
+        code = code.replace('/','')
+        code = code.replace(' ','')
+        code = code.replace('_','')
+        if cert_course.get('Session') != '2002/2003':
+            continue
+        certificate = site.portal_catalog({'meta_type': "Certificate",
+                                           'SearchableText': code})
+        if not certificate:
+            print code
+            logger.info('CertCode %(CertCode)s for %(CosCode)s not found' % cert_course)
+            continue
+        certificate = certificate[-1].getObject()
+        certificate_code = certificate.getId()
+        if depid not in d_ids:
+            logger.info('Department %(Dept)s for %(CertCode)s not found' % cert_course)
+            continue
+        course_code = cert_course.get('CosCode')
+        level = cert_course.get('Level')
+        l = getattr(certificate,level,None)
+        if l is None:
+            #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
+            logger.info('Creating Level %(Level)s in certificate %(CertCode)s' % cert_course)
+            certificate.invokeFactory('StudyLevel', level)
+            l = getattr(certificate, level)
+            l.invokeFactory('Semester','first')
+            l.invokeFactory('Semester','second')
+        first_s = getattr(l,'first')
+        second_s = getattr(l,'second')
+        if cert_course.get('Semester') == '1':
+            semester = first_s
+        else:
+            semester = second_s
+        if hasattr(semester,course_code):
+            logger.info('Duplicate %(CosCode)s in Level %(Level)s' % cert_course)
+            continue
+            
+        semester.invokeFactory('CertificateCourse',course_code)
+        cc = getattr(semester,course_code)
+        dict = {}
+        dict['code'] = cert_course.get('CosCode')
+        dict['certificate_code'] = code
+        dict['certificate_code_org'] = cert_course.get('CertCode') 
+        dict['department'] = cert_course.get('Dept') 
+        dict['admin_status'] = cert_course.get('Admstatus')
+        dict['session'] = cert_course.get('Session')
+        if cert_course.get('Core') != '':
+            dict['core_or_elective'] = True
+        else:
+            dict['core_or_elective'] = False
+        dict['level'] = cert_course.get('Level')
+        cc.getContent().edit(mapping=dict)
 ###)
 
@@ -221,10 +493,11 @@
     loadDepartmentsFromCSV(academics,site,context)
     loadCoursesFromCSV(academics,site,context)
-    studycourses = getattr(academics,'studycourses',None)
-    if studycourses is None:
-        academics.invokeFactory('SCFolder','studycourses')
-        studycourses = getattr(academics,'studycourses')
-        studycourses.getContent().edit(mapping={'Title':'Studycourses'})
-    installFaculties(academics)
+##    certificates = getattr(academics,'certificates',None)
+##    if certificates is None:
+##        academics.invokeFactory('SCFolder','certificates')
+##        certificates = getattr(academics,'certificates')
+##        certificates.getContent().edit(mapping={'Title':'Certificates'})
+    loadCertificatesFromCSV(site,context)
+    loadCertificateCoursesFromCSV(site,context)
     if not hasattr(portal,'accommodation'):
         portal.invokeFactory('AccoFolder','accommodation')
Index: /waeup_product/trunk/profiles/default/layouts.xml
===================================================================
--- /waeup_product/trunk/profiles/default/layouts.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/layouts.xml	(revision 256)
@@ -8,4 +8,6 @@
  <object name="admission_slip" meta_type="CPS Layout"/>
  <object name="admission_status" meta_type="CPS Layout"/>
+ <object name="certificate" meta_type="CPS Layout"/>
+ <object name="certificate_course" meta_type="CPS Layout"/>
  <object name="clearance" meta_type="CPS Layout"/>
  <object name="clearence" meta_type="CPS Layout"/>
@@ -24,5 +26,4 @@
  <object name="student_semester" meta_type="CPS Layout"/>
  <object name="study_level" meta_type="CPS Layout"/>
- <object name="studycourse" meta_type="CPS Layout"/>
  <object name="university" meta_type="CPS Layout"/>
  <object name="waeup_common" meta_type="CPS Layout"/>
Index: /waeup_product/trunk/profiles/default/layouts/certificate.xml
===================================================================
--- /waeup_product/trunk/profiles/default/layouts/certificate.xml	(revision 256)
+++ /waeup_product/trunk/profiles/default/layouts/certificate.xml	(revision 256)
@@ -0,0 +1,225 @@
+<?xml version="1.0"?>
+<object name="certificate" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_default_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="admin_status" meta_type="String Widget">
+  <property name="title">Admin Status</property>
+  <property name="fields">
+   <element value="admin_status"/>
+  </property>
+  <property name="label">Admin Status</property>
+  <property name="label_edit">Admin Status</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="category" meta_type="String Widget">
+  <property name="title">Category</property>
+  <property name="fields">
+   <element value="category"/>
+  </property>
+  <property name="label">Category</property>
+  <property name="label_edit">Category</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="code" meta_type="String Widget">
+  <property name="title">Code</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Code</property>
+  <property name="label_edit">Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">20</property>
+ </widget>
+ <widget name="department" meta_type="Select Widget">
+  <property name="title">Department</property>
+  <property name="fields">
+   <element value="department"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Department</property>
+  <property name="label_edit">Department</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">get_departments_voc</property>
+ </widget>
+ <widget name="end_level" meta_type="Select Widget">
+  <property name="title">End Level</property>
+  <property name="fields">
+   <element value="end_level"/>
+  </property>
+  <property name="label">End Level</property>
+  <property name="label_edit">End Level</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">courselevel</property>
+ </widget>
+ <widget name="faculty" meta_type="Select Widget">
+  <property name="title">Faculty</property>
+  <property name="fields">
+   <element value="faculty"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Faculty</property>
+  <property name="label_edit">Faculty</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">get_faculties_voc</property>
+ </widget>
+ <widget name="heading" meta_type="String Widget">
+  <property name="title">Heading</property>
+  <property name="fields">
+   <element value="heading"/>
+  </property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="m_prefix" meta_type="String Widget">
+  <property name="title">MPrefix</property>
+  <property name="fields">
+   <element value="m_prefix"/>
+  </property>
+  <property name="label">MPrefix</property>
+  <property name="label_edit">MPrefix</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="max_load" meta_type="Int Widget">
+  <property name="title">Maximum Load</property>
+  <property name="fields">
+   <element value="max_load"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Maximum Load</property>
+  <property name="label_edit">Maximum Load</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="max_pass" meta_type="Int Widget">
+  <property name="title">Maximum Pass</property>
+  <property name="fields">
+   <element value="max_pass"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Maximum Pass</property>
+  <property name="label_edit">Maximum Pass</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="n_core" meta_type="Int Widget">
+  <property name="title">NCore</property>
+  <property name="fields">
+   <element value="n_core"/>
+  </property>
+  <property name="label">NCore</property>
+  <property name="label_edit">NCore</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="nr_years" meta_type="Int Widget">
+  <property name="title">Nr of Years</property>
+  <property name="fields">
+   <element value="nr_years"/>
+  </property>
+  <property name="label">Nr of Years</property>
+  <property name="label_edit">Nr of Years</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="probation_credits" meta_type="Int Widget">
+  <property name="title">Probation  Credits</property>
+  <property name="fields">
+   <element value="probation_credits"/>
+  </property>
+  <property name="label">Probation  Credits</property>
+  <property name="label_edit">Probation  Credits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="promotion_credits" meta_type="Int Widget">
+  <property name="title">Promotion  Credits</property>
+  <property name="fields">
+   <element value="promotion_credits"/>
+  </property>
+  <property name="label">Promotion  Credits</property>
+  <property name="label_edit">Promotion  Credits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="start_level" meta_type="Select Widget">
+  <property name="title">Start Level</property>
+  <property name="fields">
+   <element value="start_level"/>
+  </property>
+  <property name="label">Start Level</property>
+  <property name="label_edit">Start Level</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">courselevel</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="faculty"/>
+  </row>
+  <row>
+   <cell name="department"/>
+  </row>
+  <row>
+   <cell name="start_level"/>
+  </row>
+  <row>
+   <cell name="end_level"/>
+  </row>
+  <row>
+   <cell name="max_pass"/>
+  </row>
+  <row>
+   <cell name="promotion_credits"/>
+  </row>
+  <row>
+   <cell name="probation_credits"/>
+  </row>
+  <row>
+   <cell name="admin_status"/>
+  </row>
+  <row>
+   <cell name="category"/>
+  </row>
+  <row>
+   <cell name="m_prefix"/>
+  </row>
+  <row>
+   <cell name="nr_years"/>
+  </row>
+  <row>
+   <cell name="n_core"/>
+  </row>
+ </table>
+</object>
Index: /waeup_product/trunk/profiles/default/layouts/certificate_course.xml
===================================================================
--- /waeup_product/trunk/profiles/default/layouts/certificate_course.xml	(revision 256)
+++ /waeup_product/trunk/profiles/default/layouts/certificate_course.xml	(revision 256)
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<object name="certificate_course" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="admin_status" meta_type="String Widget">
+  <property name="title">Admin Status</property>
+  <property name="fields">
+   <element value="admin_status"/>
+  </property>
+  <property name="label">Admin Status</property>
+  <property name="label_edit">Admin Status</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="certificate_code" meta_type="String Widget">
+  <property name="title">Certificate code</property>
+  <property name="fields">
+   <element value="certificate_code"/>
+  </property>
+  <property name="label">Certificate code</property>
+  <property name="label_edit">Certificate code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="certificate_code_org" meta_type="String Widget">
+  <property name="title">Certificate original code</property>
+  <property name="fields">
+   <element value="certificate_code_org"/>
+  </property>
+  <property name="label">Certificate original code</property>
+  <property name="label_edit">Certificate original code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="code" meta_type="String Widget">
+  <property name="title">Code</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Code</property>
+  <property name="label_edit">Code</property>
+  <property name="display_width">10</property>
+ </widget>
+ <widget name="core_or_elective" meta_type="Boolean Widget">
+  <property name="title">Core or Elective</property>
+  <property name="fields">
+   <element value="core_or_elective"/>
+  </property>
+  <property name="label">Core or Elective</property>
+  <property name="label_edit">Core or Elective</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">elective</property>
+  <property name="label_true">core</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="certificate_code"/>
+  </row>
+  <row>
+   <cell name="certificate_code_org"/>
+  </row>
+  <row>
+   <cell name="core_or_elective"/>
+  </row>
+  <row>
+   <cell name="admin_status"/>
+  </row>
+ </table>
+</object>
Index: /waeup_product/trunk/profiles/default/layouts/course.xml
===================================================================
--- /waeup_product/trunk/profiles/default/layouts/course.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/layouts/course.xml	(revision 256)
@@ -7,4 +7,15 @@
  <property name="flexible_widgets"/>
  <property name="validate_values_expr"></property>
+ <widget name="category" meta_type="String Widget">
+  <property name="title">Category</property>
+  <property name="fields">
+   <element value="category"/>
+  </property>
+  <property name="label">Category</property>
+  <property name="label_edit">Category</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <widget name="code" meta_type="String Widget">
   <property name="title">Code</property>
@@ -17,32 +28,28 @@
   <property name="display_width">10</property>
  </widget>
- <widget name="core_elective" meta_type="Boolean Widget">
+ <widget name="credits" meta_type="Int Widget">
+  <property name="title">Credits</property>
   <property name="fields">
-   <element value="core_elective"/>
+   <element value="credits"/>
   </property>
-  <property name="is_required">True</property>
-  <property name="label">Core or elective</property>
-  <property name="label_edit">Core or elective</property>
-  <property name="label_false">Elective Course</property>
-  <property name="label_true">Core Course</property>
+  <property name="label">Credits</property>
+  <property name="label_edit">Credits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
  </widget>
- <widget name="credit" meta_type="Int Widget">
+ <widget name="org_code" meta_type="String Widget">
+  <property name="title">Original Code</property>
   <property name="fields">
-   <element value="credit"/>
+   <element value="org_code"/>
   </property>
-  <property name="is_required">True</property>
-  <property name="label">Credit</property>
-  <property name="label_edit">Credit</property>
- </widget>
- <widget name="level" meta_type="Select Widget">
-  <property name="fields">
-   <element value="level"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Level</property>
-  <property name="label_edit">Level</property>
-  <property name="vocabulary">courselevel</property>
+  <property name="label">Original Code</property>
+  <property name="label_edit">Original Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
  </widget>
  <widget name="passmark" meta_type="Int Widget">
+  <property name="title">Passmark</property>
   <property name="fields">
    <element value="passmark"/>
@@ -55,49 +62,30 @@
   <property name="hidden_readonly_layout_modes"/>
  </widget>
- <widget name="semester" meta_type="Select Widget">
-  <property name="title">Semester</property>
+ <widget name="semester" meta_type="Int Widget">
+  <property name="title">Nr of semesters</property>
   <property name="fields">
    <element value="semester"/>
   </property>
-  <property name="label">Semester</property>
-  <property name="label_edit">Semester</property>
+  <property name="label">Nr of semesters</property>
+  <property name="label_edit">Nr of semesters</property>
   <property name="readonly_layout_modes"/>
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
-  <property name="vocabulary">semester_voc</property>
- </widget>
- <widget name="text" meta_type="Text Widget">
-  <property name="fields">
-   <element value="text"/>
-  </property>
-  <property name="label">Text</property>
-  <property name="label_edit">Text</property>
-  <property name="help">Short Description</property>
-  <property name="is_i18n">True</property>
-  <property name="hidden_layout_modes"/>
-  <property name="css_class">description</property>
-  <property name="width">72</property>
  </widget>
  <table>
-  <row>
-   <cell name="heading"/>
-  </row>
-  <row>
-   <cell name="text"/>
-  </row>
-  <row>
-   <cell name="level"/>
-  </row>
   <row>
    <cell name="code"/>
   </row>
   <row>
-   <cell name="semester"/>
+   <cell name="org_code"/>
   </row>
   <row>
-   <cell name="credit"/>
+   <cell name="category"/>
   </row>
   <row>
-   <cell name="core_elective"/>
+   <cell name="credits"/>
+  </row>
+  <row>
+   <cell name="semester"/>
   </row>
   <row>
Index: eup_product/trunk/profiles/default/layouts/studycourse.xml
===================================================================
--- /waeup_product/trunk/profiles/default/layouts/studycourse.xml	(revision 255)
+++ 	(revision )
@@ -1,103 +1,0 @@
-<?xml version="1.0"?>
-<object name="studycourse" meta_type="CPS Layout">
- <property name="layout_create_method"></property>
- <property name="layout_edit_method"></property>
- <property name="layout_view_method"></property>
- <property name="style_prefix">layout_default_</property>
- <property name="flexible_widgets"/>
- <property name="validate_values_expr"></property>
- <widget name="code" meta_type="String Widget">
-  <property name="title">Code</property>
-  <property name="fields">
-   <element value="code"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Code</property>
-  <property name="label_edit">Code</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
-  <property name="display_width">6</property>
-  <property name="size_max">6</property>
- </widget>
- <widget name="department" meta_type="Select Widget">
-  <property name="title">Department</property>
-  <property name="fields">
-   <element value="department"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Department</property>
-  <property name="label_edit">Department</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="faculty" meta_type="Select Widget">
-  <property name="title">Faculty</property>
-  <property name="fields">
-   <element value="faculty"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Faculty</property>
-  <property name="label_edit">Faculty</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="max_load" meta_type="Int Widget">
-  <property name="title">Maximum Load</property>
-  <property name="fields">
-   <element value="max_load"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Maximum Load</property>
-  <property name="label_edit">Maximum Load</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="max_pass" meta_type="Int Widget">
-  <property name="title">Maximum Pass</property>
-  <property name="fields">
-   <element value="max_pass"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Maximum Pass</property>
-  <property name="label_edit">Maximum Pass</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="nr_of_levels" meta_type="Int Widget">
-  <property name="title">Nr of Levels</property>
-  <property name="fields">
-   <element value="nr_of_levels"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Nr of Levels</property>
-  <property name="label_edit">Nr of Levels</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <table>
-  <row>
-   <cell name="code"/>
-  </row>
-  <row>
-   <cell name="faculty"/>
-  </row>
-  <row>
-   <cell name="department"/>
-  </row>
-  <row>
-   <cell name="nr_of_levels"/>
-  </row>
-  <row>
-   <cell name="max_load"/>
-  </row>
-  <row>
-   <cell name="max_pass"/>
-  </row>
- </table>
-</object>
Index: /waeup_product/trunk/profiles/default/rolemap.xml
===================================================================
--- /waeup_product/trunk/profiles/default/rolemap.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/rolemap.xml	(revision 256)
@@ -2,78 +2,25 @@
 <rolemap>
   <roles>
-    <role name="Anonymous"/>
-    <role name="AttendeeManager"/>
-    <role name="AttendeeReader"/>
-    <role name="Authenticated"/>
-    <role name="ChatGuest"/>
-    <role name="ChatModerator"/>
-    <role name="ChatPoster"/>
-    <role name="Contributor"/>
-    <role name="CourseManager"/>
-    <role name="DepartmentManager"/>
-    <role name="EventOrganizer"/>
-    <role name="EventParticipant"/>
-    <role name="EventReader"/>
-    <role name="FacultyManager"/>
-    <role name="ForumModerator"/>
-    <role name="ForumPoster"/>
-    <role name="Manager"/>
-    <role name="Member"/>
-    <role name="Owner"/>
-    <role name="Reader"/>
-    <role name="Reviewer"/>
-    <role name="SectionIntermediateReviewer"/>
-    <role name="SectionManager"/>
-    <role name="SectionReader"/>
-    <role name="SectionReviewer"/>
+    <role name="CourseAdvisor"/>
+    <role name="Lecturer"/>
     <role name="Student"/>
-    <role name="StudentManager"/>
-    <role name="ThemeManager"/>
-    <role name="UniversityManager"/>
-    <role name="WorkspaceManager"/>
-    <role name="WorkspaceMember"/>
-    <role name="WorkspaceReader"/>
   </roles>
   <permissions>
-    <permission name="Access future portal content"
+    <permission name="Certificate Course Delete"
                 acquire="True">
-      <role name="Reviewer"/>
+      <role name="Owner"/>
       <role name="Manager"/>
+      <role name="SectionManager"/>
+      <role name="CourseAdvisor"/>
     </permission>
     <permission name="Add portal content" acquire="True">
       <role name="Owner"/>
       <role name="Manager"/>
+      <role name="Student"/>
     </permission>
     <permission name="Add portal folders" acquire="True">
       <role name="Owner"/>
       <role name="Manager"/>
-    </permission>
-    <permission name="Can subscribe" acquire="False">
-      <role name="Manager"/>
-    </permission>
-    <permission name="Chat Moderate" acquire="False">
-      <role name="Manager"/>
-      <role name="WorkspaceManager"/>
-      <role name="SectionManager"/>
-      <role name="ChatModerator"/>
-    </permission>
-    <permission name="Chat Post" acquire="False">
-      <role name="Manager"/>
-      <role name="WorkspaceManager"/>
-      <role name="SectionManager"/>
-      <role name="ChatPoster"/>
-    </permission>
-    <permission name="Chat Reply" acquire="False">
-      <role name="Manager"/>
-      <role name="WorkspaceManager"/>
-      <role name="SectionManager"/>
-      <role name="ChatModerator"/>
-      <role name="ChatGuest"/>
-    </permission>
-    <permission name="Create events" acquire="True">
-      <role name="AttendeeManager"/>
-      <role name="Manager"/>
-      <role name="Owner"/>
-      <role name="WorkspaceManager"/>
+      <role name="Student"/>
     </permission>
     <permission name="Delete objects" acquire="True">
@@ -81,117 +28,4 @@
       <role name="Manager"/>
     </permission>
-    <permission name="Edit calendar" acquire="True">
-      <role name="AttendeeManager"/>
-      <role name="Manager"/>
-      <role name="Owner"/>
-      <role name="WorkspaceManager"/>
-    </permission>
-    <permission name="FTP access" acquire="True">
-      <role name="Owner"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Forum Moderate" acquire="False">
-      <role name="Manager"/>
-      <role name="Owner"/>
-      <role name="WorkspaceManager"/>
-      <role name="ForumModerator"/>
-      <role name="SectionManager"/>
-      <role name="SectionReviewer"/>
-    </permission>
-    <permission name="Forum Post" acquire="False">
-      <role name="Manager"/>
-      <role name="Owner"/>
-      <role name="Member"/>
-      <role name="WorkspaceManager"/>
-      <role name="WorkspaceMember"/>
-      <role name="WorkspaceReader"/>
-      <role name="ForumPoster"/>
-      <role name="SectionManager"/>
-      <role name="SectionReviewer"/>
-      <role name="SectionReader"/>
-    </permission>
-    <permission name="Forum manage comments" acquire="False">
-      <role name="Manager"/>
-      <role name="Owner"/>
-      <role name="WorkspaceManager"/>
-      <role name="SectionManager"/>
-      <role name="SectionReviewer"/>
-    </permission>
-    <permission name="Invite attendees" acquire="True">
-      <role name="EventOrganizer"/>
-      <role name="EventParticipant"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="List portal members" acquire="True">
-      <role name="Member"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="List undoable changes" acquire="True">
-      <role name="Member"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Manage Portlets" acquire="False">
-      <role name="Manager"/>
-      <role name="Owner"/>
-    </permission>
-    <permission name="Manage Subscriptions" acquire="False">
-      <role name="Manager"/>
-    </permission>
-    <permission name="Manage participation status"
-                acquire="True">
-      <role name="AttendeeManager"/>
-      <role name="Manager"/>
-      <role name="Owner"/>
-      <role name="WorkspaceManager"/>
-    </permission>
-    <permission name="Manage properties" acquire="True">
-      <role name="Owner"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Modify event" acquire="True">
-      <role name="EventOrganizer"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Reply to item" acquire="True">
-      <role name="Member"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Review portal content" acquire="True">
-      <role name="Reviewer"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Set own password" acquire="True">
-      <role name="Member"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Set own properties" acquire="True">
-      <role name="Member"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Undo changes" acquire="True">
-      <role name="Owner"/>
-      <role name="Manager"/>
-    </permission>
-    <permission name="Use external editor" acquire="False">
-      <role name="Manager"/>
-      <role name="Member"/>
-    </permission>
-    <permission name="View My Subscriptions" acquire="False">
-      <role name="Manager"/>
-      <role name="Member"/>
-    </permission>
-    <permission name="View calendar" acquire="True">
-      <role name="AttendeeManager"/>
-      <role name="AttendeeReader"/>
-      <role name="Manager"/>
-      <role name="Owner"/>
-      <role name="WorkspaceReader"/>
-      <role name="WorkspaceManager"/>
-    </permission>
-    <permission name="View management screens"
-                acquire="True">
-      <role name="Owner"/>
-      <role name="Manager"/>
-    </permission>
   </permissions>
 </rolemap>
Index: /waeup_product/trunk/profiles/default/schemas.xml
===================================================================
--- /waeup_product/trunk/profiles/default/schemas.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/schemas.xml	(revision 256)
@@ -4,4 +4,6 @@
  <object name="academics" meta_type="CPS Schema"/>
  <object name="accommodation" meta_type="CPS Schema"/>
+ <object name="certificate" meta_type="CPS Schema"/>
+ <object name="certificate_course" meta_type="CPS Schema"/>
  <object name="course" meta_type="CPS Schema"/>
  <object name="course_results" meta_type="CPS Schema"/>
@@ -21,5 +23,4 @@
  <object name="student_schoolresults" meta_type="CPS Schema"/>
  <object name="students" meta_type="CPS Schema"/>
- <object name="studycourse" meta_type="CPS Schema"/>
  <object name="study_level" meta_type="CPS Schema"/>
  <object name="university" meta_type="CPS Schema"/>
Index: /waeup_product/trunk/profiles/default/schemas/certificate.xml
===================================================================
--- /waeup_product/trunk/profiles/default/schemas/certificate.xml	(revision 256)
+++ /waeup_product/trunk/profiles/default/schemas/certificate.xml	(revision 256)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<object name="certificate" meta_type="CPS Schema">
+ <field name="admin_status" meta_type="CPS String Field"/>
+ <field name="category" meta_type="CPS String Field"/>
+ <field name="code" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+ <field name="department" meta_type="CPS String Field"/>
+ <field name="end_level" meta_type="CPS String Field"/>
+ <field name="faculty" meta_type="CPS String Field"/>
+ <field name="heading" meta_type="CPS String Field"/>
+ <field name="m_prefix" meta_type="CPS String Field"/>
+ <field name="max_load" meta_type="CPS Int Field"/>
+ <field name="max_pass" meta_type="CPS Int Field"/>
+ <field name="n_core" meta_type="CPS Int Field"/>
+ <field name="nr_years" meta_type="CPS Int Field"/>
+ <field name="probation_credits" meta_type="CPS Int Field"/>
+ <field name="promotion_credits" meta_type="CPS Int Field"/>
+ <field name="start_level" meta_type="CPS String Field"/>
+</object>
Index: /waeup_product/trunk/profiles/default/schemas/certificate_course.xml
===================================================================
--- /waeup_product/trunk/profiles/default/schemas/certificate_course.xml	(revision 256)
+++ /waeup_product/trunk/profiles/default/schemas/certificate_course.xml	(revision 256)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<object name="certificate_course" meta_type="CPS Schema">
+ <field name="admin_status" meta_type="CPS String Field"/>
+ <field name="certificate_code" meta_type="CPS String Field"/>
+ <field name="certificate_code_org" meta_type="CPS String Field"/>
+ <field name="code" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+ <field name="core_or_elective" meta_type="CPS Boolean Field"/>
+ <field name="department" meta_type="CPS String Field"/>
+ <field name="level" meta_type="CPS String Field"/>
+ <field name="session" meta_type="CPS String Field"/>
+</object>
Index: /waeup_product/trunk/profiles/default/schemas/course.xml
===================================================================
--- /waeup_product/trunk/profiles/default/schemas/course.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/schemas/course.xml	(revision 256)
@@ -1,14 +1,10 @@
 <?xml version="1.0"?>
 <object name="course" meta_type="CPS Schema">
+ <field name="category" meta_type="CPS String Field"/>
  <field name="code" meta_type="CPS String Field">
   <property name="is_searchabletext">True</property>
  </field>
- <field name="core_elective" meta_type="CPS Boolean Field">
-  <property name="default_expr">python:True</property>
- </field>
- <field name="credit" meta_type="CPS Int Field">
-  <property name="default_expr">string:</property>
- </field>
- <field name="level" meta_type="CPS String Field">
+ <field name="credits" meta_type="CPS Int Field"/>
+ <field name="org_code" meta_type="CPS String Field">
   <property name="is_searchabletext">True</property>
  </field>
@@ -16,8 +12,5 @@
   <property name="default_expr">python:40</property>
  </field>
- <field name="semester" meta_type="CPS String Field"/>
- <field name="text" meta_type="CPS String Field">
-  <property name="is_searchabletext">True</property>
- </field>
+ <field name="semester" meta_type="CPS Int Field"/>
+ <field name="session" meta_type="CPS String Field"/>
 </object>
-
Index: eup_product/trunk/profiles/default/schemas/studycourse.xml
===================================================================
--- /waeup_product/trunk/profiles/default/schemas/studycourse.xml	(revision 255)
+++ 	(revision )
@@ -1,12 +1,0 @@
-<?xml version="1.0"?>
-<object name="studycourse" meta_type="CPS Schema">
- <field name="code" meta_type="CPS String Field">
-  <property name="is_searchabletext">True</property>
- </field>
- <field name="department" meta_type="CPS String Field"/>
- <field name="faculty" meta_type="CPS String Field"/>
- <field name="heading" meta_type="CPS String Field"/>
-  <field name="max_load" meta_type="CPS Int Field"/>
- <field name="max_pass" meta_type="CPS Int Field"/>
- <field name="nr_of_levels" meta_type="CPS Int Field"/>
-</object>
Index: /waeup_product/trunk/profiles/default/types.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/types.xml	(revision 256)
@@ -5,5 +5,7 @@
  <object name="AccoFolder" meta_type="CPS Flexible Type Information"/>
  <object name="Accommodation" meta_type="CPS Flexible Type Information"/>
+ <object name="Certificate" meta_type="CPS Flexible Type Information"/>
  <object name="Course" meta_type="CPS Flexible Type Information"/>
+ <object name="CertificateCourse" meta_type="CPS Flexible Type Information"/>
  <object name="CourseTicket" meta_type="CPS Flexible Type Information"/>
  <object name="Department" meta_type="CPS Flexible Type Information"/>
@@ -13,5 +15,4 @@
  <object name="Semester" meta_type="CPS Flexible Type Information"/>
  <object name="SCFolder" meta_type="CPS Flexible Type Information"/>
- <object name="StudyCourse" meta_type="CPS Flexible Type Information"/>
  <object name="Student" meta_type="CPS Flexible Type Information"/>
  <object name="StudentDocuments" meta_type="CPS Flexible Type Information"/>
Index: /waeup_product/trunk/profiles/default/types/Certificate.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types/Certificate.xml	(revision 256)
+++ /waeup_product/trunk/profiles/default/types/Certificate.xml	(revision 256)
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<object name="Certificate" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Certificate</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">Certificate</property>
+ <property name="product">WAeUP</property>
+ <property name="factory">addCertificate</property>
+ <property name="immediate_view">folder_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="CertificateCourse"/>
+  <element value="Semester"/>
+  <element value="StudyLevel"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="certificate"/>
+ </property>
+ <property name="layouts">
+  <element value="certificate"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="temporary_view_all"/>
+ <alias from="view" to="temporary_view_all"/>
+ <action title="Standard View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/temporary_view_all"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="python:member and 'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/cpsdocument_edit_form" visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="python:member and 'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/cpsdocument_metadata" visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_folder_contents" action_id="contents" category="object"
+    condition_expr="" url_expr="string:${object/absolute_url}/folder_contents"
+    visible="True"/>
+</object>
Index: /waeup_product/trunk/profiles/default/types/CertificateCourse.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types/CertificateCourse.xml	(revision 256)
+++ /waeup_product/trunk/profiles/default/types/CertificateCourse.xml	(revision 256)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<object name="CertificateCourse" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Certificate Course </property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">CertificateCourse</property>
+ <property name="product">WAeUP</property>
+ <property name="factory">addCertificateCourse</property>
+ <property name="immediate_view">cpsdocument_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type"></property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="certificate_course"/>
+ </property>
+ <property name="layouts">
+  <element value="waeup_common"/>
+  <element value="certificate_course"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="temporary_view_all"/>
+ <alias from="view" to="temporary_view_all"/>
+ <action title="Standard View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/temporary_view_all"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True"/>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="python:member and 'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/cpsdocument_metadata" visible="False"/>
+ <action title="delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True"/>
+</object>
Index: /waeup_product/trunk/profiles/default/types/Department.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types/Department.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/types/Department.xml	(revision 256)
@@ -12,6 +12,6 @@
  <property name="filter_content_types">True</property>
  <property name="allowed_content_types">
+  <element value="Certificate"/>
   <element value="Course"/>
-  <element value="Student"/>
  </property>
  <property name="allow_discussion">False</property>
Index: /waeup_product/trunk/profiles/default/types/SCFolder.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types/SCFolder.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/types/SCFolder.xml	(revision 256)
@@ -12,5 +12,5 @@
  <property name="filter_content_types">True</property>
  <property name="allowed_content_types">
-  <element value="StudyCourse"/>
+  <element value="Certificate"/>
  </property>
  <property name="allow_discussion">False</property>
@@ -40,19 +40,13 @@
   <permission value="View"/>
  </action>
- <action title="Add StudyCourse" action_id="add_studycourse" category="object"
+ <action title="Add Certificate" action_id="add_certificate" category="object"
     condition_expr="python:True or member and 'UniversityManager'in member.getRoles()"
-    url_expr="string:${object/absolute_url}/create_studycourse"
-    visible="True">
-  <permission value="University Manage"/>
- </action>
+    url_expr="string:${object/absolute_url}/create_certificate"
+    visible="True"/>
  <action title="action_folder_contents" action_id="contents" category="object"
     condition_expr="" url_expr="string:${object/absolute_url}/folder_contents"
-    visible="True">
-  <permission value="University Manage"/>
- </action>
+    visible="True"/>
  <action title="delegate" action_id="localroles" category="object"
     condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
-    visible="False">
-  <permission value="University Manage"/>
- </action>
+    visible="False"/>
 </object>
Index: /waeup_product/trunk/profiles/default/types/Semester.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types/Semester.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/types/Semester.xml	(revision 256)
@@ -23,5 +23,5 @@
  </property>
  <property name="layouts">
-  <element value="student_semester"/>
+  <element value="waeup_common"/>
  </property>
  <property name="layout_clusters">
Index: eup_product/trunk/profiles/default/types/StudyCourse.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types/StudyCourse.xml	(revision 255)
+++ 	(revision )
@@ -1,53 +1,0 @@
-<?xml version="1.0"?>
-<object name="StudyCourse" meta_type="CPS Flexible Type Information"
-   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
- <property name="title">WAeUP StudyCourse</property>
- <property name="description"></property>
- <property name="content_icon"></property>
- <property name="content_meta_type">StudyCourse</property>
- <property name="product">WAeUP</property>
- <property name="factory">addStudyCourse</property>
- <property name="immediate_view">folder_view</property>
- <property name="global_allow">True</property>
- <property name="filter_content_types">True</property>
- <property name="allow_discussion">False</property>
- <property name="cps_is_searchable">True</property>
- <property name="cps_proxy_type">folder</property>
- <property name="cps_display_as_document_in_listing">True</property>
- <property name="schemas">
-  <element value="metadata"/>
-  <element value="common"/>
-  <element value="studycourse"/>
- </property>
- <property name="layouts">
-  <element value="studycourse"/>
- </property>
- <property name="layout_clusters">
-  <element value="metadata:metadata"/>
- </property>
- <property name="flexible_layouts"/>
- <property name="storage_methods"/>
- <property name="cps_is_portlet">False</property>
- <alias from="(Default)" to="temporary_view_all"/>
- <alias from="view" to="temporary_view_all"/>
- <action title="Standard View" action_id="view" category="object"
-    condition_expr="" url_expr="string:${object_url}/temporary_view_all"
-    visible="True">
-  <permission value="View"/>
- </action>
- <action title="action_edit" action_id="edit" category="object"
-    condition_expr="python:member and 'Manager' in member.getRoles()"
-    url_expr="string:${object_url}/cpsdocument_edit_form" visible="True">
-  <permission value="Modify portal content"/>
- </action>
- <action title="action_metadata" action_id="metadata" category="object"
-    condition_expr="python:member and 'Manager' in member.getRoles()"
-    url_expr="string:${object_url}/cpsdocument_metadata" visible="True">
-  <permission value="Modify portal content"/>
- </action>
- <action title="delegate" action_id="localroles" category="object"
-    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
-    visible="False">
-  <permission value="Modify portal content"/>
- </action>
-</object>
Index: /waeup_product/trunk/profiles/default/types/StudyLevel.xml
===================================================================
--- /waeup_product/trunk/profiles/default/types/StudyLevel.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/types/StudyLevel.xml	(revision 256)
@@ -34,5 +34,5 @@
  <alias from="view" to="temporary_view_all"/>
  <action title="Standard View" action_id="view" category="object"
-    condition_expr="" url_expr="string:${object_url}/temporary_view_all"
+    condition_expr="" url_expr="string:${object_url}/level_view"
     visible="True">
   <permission value="View"/>
@@ -41,16 +41,10 @@
     category="object"
     condition_expr="python:member and 'Student'in member.getRoles()"
-    url_expr="string:${object_url}/register_level" visible="True">
-  <permission value="Student Manage"/>
- </action>
+    url_expr="string:${object_url}/register_level" visible="True"/>
  <action title="action_metadata" action_id="metadata" category="object"
     condition_expr="python:member and 'Manager' in member.getRoles()"
-    url_expr="string:${object_url}/cpsdocument_metadata" visible="True">
-  <permission value="University Manage"/>
- </action>
+    url_expr="string:${object_url}/cpsdocument_metadata" visible="True"/>
  <action title="delegate" action_id="localroles" category="object"
     condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
-    visible="False">
-  <permission value="University Manage"/>
- </action>
+    visible="False"/>
 </object>
Index: /waeup_product/trunk/profiles/default/workflows.xml
===================================================================
--- /waeup_product/trunk/profiles/default/workflows.xml	(revision 255)
+++ /waeup_product/trunk/profiles/default/workflows.xml	(revision 256)
@@ -18,4 +18,5 @@
  <object name="waeup_accommodation_wf" meta_type="CPS Workflow"/>
  <object name="waeup_base_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_certificate_wf" meta_type="CPS Workflow"/>
  <object name="waeup_course_wf" meta_type="CPS Workflow"/>
  <object name="waeup_department_wf" meta_type="CPS Workflow"/>
@@ -23,5 +24,4 @@
  <object name="waeup_section_wf" meta_type="CPS Workflow"/>
  <object name="waeup_student_wf" meta_type="CPS Workflow"/>
- <object name="waeup_studycourse_wf" meta_type="CPS Workflow"/>
  <object name="waeup_workspace_wf" meta_type="CPS Workflow"/>
  <object name="workspace_calendar_wf" meta_type="CPS Workflow"/>
@@ -41,4 +41,10 @@
   <type type_id="Accommodation">
    <bound-workflow workflow_id="waeup_accommodation_wf"/>
+  </type>
+  <type type_id="Certificate">
+   <bound-workflow workflow_id="waeup_certificate_wf"/>
+  </type>
+  <type type_id="CertificateCourse">
+   <bound-workflow workflow_id="waeup_certificate_wf"/>
   </type>
   <type type_id="CPS Calendar">
@@ -90,7 +96,4 @@
    <bound-workflow workflow_id="section_folder_wf"/>
   </type>
-  <type type_id="StudyCourse">
-   <bound-workflow workflow_id="waeup_studycourse_wf"/>
-  </type>
   <type type_id="StudyLevel">
    <bound-workflow workflow_id="waeup_base_wf"/>
Index: /waeup_product/trunk/profiles/default/workflows/waeup_certificate_wf/definition.xml
===================================================================
--- /waeup_product/trunk/profiles/default/workflows/waeup_certificate_wf/definition.xml	(revision 256)
+++ /waeup_product/trunk/profiles/default/workflows/waeup_certificate_wf/definition.xml	(revision 256)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_course_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>View</permission>
+ <state state_id="work" title="Work">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+   <permission-role>SectionReader</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="work" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state="work"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+</cps-workflow>
Index: /waeup_product/trunk/skins/waeup_default/getCPSCandidateLocalRoles.py
===================================================================
--- /waeup_product/trunk/skins/waeup_default/getCPSCandidateLocalRoles.py	(revision 256)
+++ /waeup_product/trunk/skins/waeup_default/getCPSCandidateLocalRoles.py	(revision 256)
@@ -0,0 +1,20 @@
+## Script (Python) "getCPSCandidateLocalRoles"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getCPSCandidateLocalRoles.py 28546 2005-10-23 01:46:45Z atchertchian $
+"""
+XXX content moved into portal_membership
+
+Override this template if you have new portal types or new roles with a
+specific mapping to register.
+"""
+from Products.CMFCore.utils import getToolByName
+mtool = getToolByName(context, 'portal_membership')
+return ['Manager','SectionManager']
+return mtool.getCPSCandidateLocalRoles(context)
Index: /waeup_product/trunk/skins/waeup_default/temporary_view_all_form.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_default/temporary_view_all_form.pt	(revision 255)
+++ /waeup_product/trunk/skins/waeup_default/temporary_view_all_form.pt	(revision 256)
@@ -42,5 +42,5 @@
                 <a href="xxx"  
                    tal:attributes="href item/absolute_url"
-                   tal:content="item/title_or_id"></a>
+                   tal:content="item/id"></a> <span tal:content="item/title_or_id" tal:omit-tag="" />
               </i>
             </td>
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 255)
+++ /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>
