Index: waeup_product/trunk/Extensions/install.py
===================================================================
--- waeup_product/trunk/Extensions/install.py	(revision 148)
+++ waeup_product/trunk/Extensions/install.py	(revision 152)
@@ -110,4 +110,5 @@
         waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'"
         waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','AcademicsFolder'"
+        waeup_ptypes += ",'StudyLevel','Semester','CourseTicket'"
         if CPSSubscriptions: ###(
 
@@ -349,5 +350,63 @@
 
 
-    def installCustomWorkflows(self):
+    def verifyPortlets(self, portlets=(), object=None): ###(
+        """Verify the existence of given portet in the object's portlet
+        container. If not found, a portlet is instantiated.
+        Existing portlets are not affected.
+
+        'portlets' is a tuple with the dictionaries given by the export tab
+        as entries.
+        The default object is the portal itself.
+
+        return the list a new portlet ids.
+        """
+
+        if object is None:
+            object = self.portal
+
+        self.log('Verifying portlets on %s' % object.absolute_url(relative=1))
+
+        portlet_container = self.getPortletContainer(object, create=1)
+
+        ttool = self.getTool('portal_types')
+
+        returned = []
+        for new_portlet in portlets:
+            existing_portlets = portlet_container.listPortlets()
+            updated = 0
+
+            # Check if the portlet needs an update
+            identifier = new_portlet.get('identifier')
+            if identifier:
+                for portlet in existing_portlets:
+                    if identifier == portlet.identifier:
+                        self.log(" Update of portlet: %s" % portlet)
+                        portlet.edit(**new_portlet)
+                        portlet_id = portlet.getId()
+                        updated = 1
+                        continue
+            slot = new_portlet.get('slot')
+            if slot:
+                for portlet in existing_portlets:
+                    if slot == portlet.slot:
+                        self.log(" Update of portlet: %s" % portlet)
+                        portlet.edit(**new_portlet)
+                        portlet_id = portlet.getId()
+                        updated = 1
+                        continue
+
+            if not updated:
+                self.log("   Creation of portlet: %s" % new_portlet)
+                portlet_id = self.portal.portal_cpsportlets.createPortlet(
+                    ptype_id=new_portlet['type'],
+                    context=object,
+                    **new_portlet)
+            if portlet_id not in returned:
+                returned.append(portlet_id)
+        return returned
+
+###)
+
+    def installCustomWorkflows(self): ###(
         """Installs custom workflows
         """
@@ -357,6 +416,7 @@
         waeupWorkflowsInstall(self.context)
 
-
-    def verifyWorkflowAssociation(self):
+###)
+
+    def verifyWorkflowAssociation(self): ###(
         """Verify workflow association
         """
@@ -368,7 +428,7 @@
         se_chains = { 'University': 'waeup_section_wf',
                       'AcademicsFolder': 'waeup_section_wf',
-                      'StudentsFolder': 'waeup_section_wf',
-                      'Student': 'waeup_section_wf',
-                      'StudentPersonal': 'waeup_section_wf',
+                      'StudentsFolder': 'waeup_student_wf',
+                      'Student': 'waeup_student_wf',
+                      'StudentPersonal': 'waeup_student_wf',
                       'Jamb': 'waeup_section_wf',
                       'ScratchCard': 'waeup_section_wf',
@@ -376,4 +436,7 @@
                       'Department': 'waeup_section_wf',
                       'Course': 'waeup_section_wf',
+                      'StudyLevel': 'waeup_student_wf',
+                      'Semester': 'waeup_student_wf',
+                      'CourseTicket': 'waeup_student_wf',
                       'AccoFolder': 'waeup_section_wf',
                       'Accommodation': 'waeup_section_wf',
@@ -387,6 +450,8 @@
                                        destructive=1)
 
-
-def install(self):
+###)
+
+
+def install(self): ###(
     installer = WAeUPInstaller(self)
     installer.install(self)
@@ -447,8 +512,8 @@
 ##              'Title': 'main tabs',
 ##              },
-              {'identifier': 'waeup_breadcrumbs',
+              {#'identifier': 'waeup_breadcrumbs',
               'type': 'Breadcrumbs Portlet',
               'slot': 'waeup_breadcrumbs',
-              'first_item': 2,
+              'first_item': 0,
               'display_site_root': 0,
               'Title': 'waeup_breadcrumbs',
@@ -457,5 +522,5 @@
               'order': 0,
               },
-              {'identifier': 'waeup_main_tab_actions',
+              {#'identifier': 'waeup_main_tab_actions',
               'type': 'Actions Portlet',
               'slot': 'main_tabs',
@@ -464,5 +529,5 @@
               'Title': 'waep_main_tab_actions',
               },
-              {'identifier': 'waeup_object_actions',
+              {#'identifier': 'waeup_object_actions',
               'type': 'Actions Portlet',
               'slot': 'waeup_object_actions',
@@ -471,5 +536,5 @@
               'Title': 'waep_manager_actions',
               },
-              {'identifier': 'waeup_left_top',
+              {#'identifier': 'waeup_left_top',
               'type': 'Custom Portlet',
               'slot': 'left_top',
@@ -483,8 +548,8 @@
 
 ###)
-
     return installer.logResult()
-
-def migrate(self):
+    ###)
+
+def migrate(self): ###(
     "update data"
     log = []
@@ -519,2 +584,4 @@
     return '\n'.join(log)
                 
+###)
+
