Index: WAeUP_SRP/trunk/Students.py
===================================================================
--- WAeUP_SRP/trunk/Students.py	(revision 451)
+++ WAeUP_SRP/trunk/Students.py	(revision 452)
@@ -198,8 +198,8 @@
             logger.error('Error reading %s.csv' % name)
             return
-        l = self.portal_catalog({'meta_type': "Student"})
-        students = {}
-        for s in l:
-            students[s.id] = s.getObject()
+##        l = self.portal_catalog({'meta_type': "Student"})
+##        students = {}
+##        for s in l:
+##            students[s.id] = s.getObject()
         l = self.portal_catalog({'meta_type': "Course"})
         courses = {}
@@ -208,5 +208,7 @@
         for result in results:
             sid = result.get('Matnumber')
-            if sid not in students.keys():
+            res = self.portal_catalog({'meta_type': "StudentClearance",
+                                     'matric_no': sid })
+            if not res:
                 em = 'Student with ID %(Matnumber)s not found\n' % result
                 logger.info(em)
@@ -214,4 +216,6 @@
                 no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
                 continue
+            sf = res[0].getObject().aq_parent
+            print sf
             course = result.get('CosCode')
             if course not in courses.keys():
@@ -230,5 +234,4 @@
                 no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
                 continue
-            sf = students.get(sid)
             sc = getattr(sf,'study_course')
             l = getattr(sc,level,None)
@@ -238,5 +241,5 @@
                 sc.invokeFactory('StudyLevel', level)
                 l = getattr(sc, level)
-                l.getContent().edit(mapping={'Title': "Level %s" % level})
+                #l.getContent().edit(mapping={'Title': "Level %s" % level})
                 l.invokeFactory('Semester','first')
                 l.invokeFactory('Semester','second')
@@ -249,5 +252,5 @@
             if snr == "2":
                 semester = getattr(l,'second')
-            logger.info('Creating CourseTicket %(CourseTicket)s in Level %(Level)s for %(Matnumber)s' % result)
+                logger.info('Creating CourseTicket %(CosCode)s in Level %(Level)s for %(Matnumber)s' % result)
             semester.invokeFactory('CourseTicket',course)
             ct = getattr(semester,course)
Index: WAeUP_SRP/trunk/__init__.py
===================================================================
--- WAeUP_SRP/trunk/__init__.py	(revision 451)
+++ WAeUP_SRP/trunk/__init__.py	(revision 452)
@@ -4,5 +4,5 @@
 from Products.CMFCore.DirectoryView import registerDirectory
 from Products.CMFCore import utils as cmfutils
-from Products.CMFCore.CMFCorePermissions import AddPortalContent
+from Products.CMFCore.permissions import AddPortalContent
 
 from Products.GenericSetup import profile_registry
@@ -16,103 +16,45 @@
 
 import Products.WAeUP_SRP.WAeUPPermissions
-from Products.WAeUP_SRP.Academics import AcademicsFolder, addAcademicsFolder
-from Products.WAeUP_SRP.University import University, addUniversity
-from Products.WAeUP_SRP.Accommodation import AccoFolder, addAccoFolder
-from Products.WAeUP_SRP.Accommodation import Accommodation, addAccommodation
-from Products.WAeUP_SRP.Academics import Certificate, addCertificate
-from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse
-from Products.WAeUP_SRP.Academics import Faculty, addFaculty
-from Products.WAeUP_SRP.Academics import Department, addDepartment
-from Products.WAeUP_SRP.Academics import Course, addCourse
-from Products.WAeUP_SRP.Academics import CourseTicket, addCourseTicket
-from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse
-from Products.WAeUP_SRP.Students import StudentsFolder, addStudentsFolder
-from Products.WAeUP_SRP.Students import Student, addStudent
-from Products.WAeUP_SRP.Students import StudentStudyCourse, addStudentStudyCourse
-from Products.WAeUP_SRP.Students import StudentAdmission, addStudentAdmission
-from Products.WAeUP_SRP.Students import StudentClearance, addStudentClearance
-from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal
-from Products.WAeUP_SRP.Students import ScratchCardBatch, addScratchCardBatch
-from Products.WAeUP_SRP.Students import ScratchCardBatchesFolder, addScratchCardBatchesFolder
-from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel
-from Products.WAeUP_SRP.Students import Semester, addSemester
-
 
 import Widgets
 
-contentClasses = (
-    University,
-    AcademicsFolder,
-    Certificate,
-    CertificateCourse,
-    Faculty,
-    Department,
-    Course,
-    CourseTicket,
-    CertificateCourse,
-    AccoFolder,
-    Accommodation,
-    StudentsFolder,
-    Student,
-    StudentStudyCourse,
-    StudentAdmission,
-    StudentClearance,
-    StudentPersonal,
-    ScratchCardBatch,
-    ScratchCardBatchesFolder,
-    StudyLevel,
-    Semester,
+waeup_types = (
+    "University.University",
+    "Academics.AcademicsFolder",
+    "Academics.Certificate",
+    "Academics.CertificateCourse",
+    "Academics.Faculty",
+    "Academics.Department",
+    "Academics.Course",
+    "Academics.CourseTicket",
+    "Academics.CertificateCourse",
+    "Accommodation.AccoFolder",
+    "Accommodation.Accommodation",
+    "Students.StudentsFolder",
+    "Students.Student",
+    "Students.StudentStudyCourse",
+    "Students.StudentAdmission",
+    "Students.StudentClearance",
+    "Students.StudentPersonal",
+    "Students.ScratchCardBatch",
+    "Students.ScratchCardBatchesFolder",
+    "Students.StudyLevel",
+    "Students.Semester",
     )
 
-contentConstructors = (
-    addUniversity,
-    addAcademicsFolder,
-    addCertificate,
-    addCertificateCourse,
-    addFaculty,
-    addDepartment,
-    addCourse,
-    addCourseTicket,
-    addCertificateCourse,
-    addAccoFolder,
-    addAccommodation,
-    addStudentsFolder,
-    addStudent,
-    addStudentStudyCourse,
-    addStudentAdmission,
-    addStudentClearance,
-    addStudentPersonal,
-    addScratchCardBatch,
-    addScratchCardBatchesFolder,
-    addStudyLevel,
-    addSemester,
-    )
+contentClasses = []
+cc = []
+for t in waeup_types:
+    module,name = t.split('.')
+    mod = __import__('Products.WAeUP_SRP.%(module)s' % vars(),
+                globals(),
+                locals(),
+                ["%(name)s" % vars(),"add%(name)s" % vars()]
+                )
+    contentClasses.append(getattr(mod,name))
+    cc.append(getattr(mod,"add%(name)s" % vars()))
+    contentConstructors = tuple(cc)
 
 fti = [{} for t in range(len(contentConstructors))]
-##fti = (
-##    {}, # University
-##    {}, #AcademicsFolder
-##    {}, #Certificate
-##    {}, #CertificateCourse
-##    {}, # Faculty
-##    {}, # Department
-##    {}, # Course
-##    {}, # CourseTicket
-##    {}, # CertificateCourse
-##    {}, # AccoFolder
-##    {}, # Accommodation
-##    {}, # StudentsFolder,
-##    {}, # Student,
-##    {}, # StudentStudyCourse,
-##    {}, # StudentAdmission,
-##    {}, # StudentClearance,
-##    {}, # StudentAdmission,
-##    {}, # StudentClearance,
-##    {}, # StudentPersonal,
-##    {}, # ScratchCardBatch,
-##    {}, # ScratchCardBatchesFolder,
-##    {}, # StudyLevel,
-##    {}, # Semester,
-##    )
 
 registerDirectory('skins', globals())
Index: WAeUP_SRP/trunk/profiles/default/types/CourseTicket.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/types/CourseTicket.xml	(revision 451)
+++ WAeUP_SRP/trunk/profiles/default/types/CourseTicket.xml	(revision 452)
@@ -14,20 +14,14 @@
  <property name="allow_discussion">False</property>
  <property name="cps_is_searchable">True</property>
- <property name="cps_proxy_type">cpsdocument</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="course"/>
   <element value="course_results"/>
  </property>
  <property name="layouts">
-  <element value="waeup_common"/>
-  <element value="course"/>
   <element value="course_results"/>
  </property>
- <property name="layout_clusters">
-  <element value="metadata:metadata"/>
- </property>
+ <property name="layout_clusters"/>
  <property name="flexible_layouts"/>
  <property name="storage_methods"/>
@@ -40,9 +34,8 @@
   <permission value="View"/>
  </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"/>
- <action title="Delegate" action_id="localroles" category="object"
-    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
-    visible="False"/>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
 </object>
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt	(revision 451)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt	(revision 452)
@@ -130,5 +130,5 @@
       </td>
     </span>
-    <span tal:condition="python: context.portal_type == 'Semester'">
+    <span tal:condition="python: info['doc'].portal_type == 'CertificateCourse'">
       <td>
         <span tal:content="info/core_or_elective">ID</span>
