Index: /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1743)
+++ /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1744)
@@ -49,64 +49,65 @@
     comments = REQUEST.get('comments')
     context.cpsdocument_notify_modification(comments=comments)
-    if context.portal_type == "StudentStudyCourse":
-        course = ds.get('study_course')
-        student_id = context.getStudentId()
-        res = context.portal_catalog(portal_type='Certificate',id = course)
-        if res:
-            c_brain = res[0]
-            c_path = c_brain.getPath().split('/')
+    if False:
+        if context.portal_type == "StudentStudyCourse":
+            course = ds.get('study_course')
+            student_id = context.getStudentId()
+            res = context.portal_catalog(portal_type='Certificate',id = course)
+            if res:
+                c_brain = res[0]
+                c_path = c_brain.getPath().split('/')
+                student_id = context.getStudentId()
+                context.students_catalog.modifyRecord(id = student_id,
+                                                      course = course,
+                                                      level = ds.get('current_level'),
+                                                      verdict = ds.get('current_verdict'),
+                                                      faculty = c_path[-4],
+                                                      department = c_path[-3],
+                                                      )
+                logger.info('%s edited %s (%s) of %s' % (member,context.id,course,student_id))
+    
+        elif context.portal_type == "StudentApplication": # disabled
+            entry_mode = ds.get('entry_mode')
             student_id = context.getStudentId()
             context.students_catalog.modifyRecord(id = student_id,
-                                                  course = course,
-                                                  level = ds.get('current_level'),
-                                                  verdict = ds.get('current_verdict'),
-                                                  faculty = c_path[-4],
-                                                  department = c_path[-3],
-                                                  )
-            logger.info('%s edited %s (%s) of %s' % (member,context.id,course,student_id))
-
-    elif context.portal_type == "StudentApplication":
-        entry_mode = ds.get('entry_mode')
-        student_id = context.getStudentId()
-        context.students_catalog.modifyRecord(id = student_id,
-                                              entry_mode = entry_mode,
-                                             )
-        logger.info('%s edited %s of %s' % (member,context.id,student_id))
-    elif context.portal_type == "StudentClearance":
-        matric_no = ds.get('matric_no')
-        student_id = context.getStudentId()
-        context.students_catalog.modifyRecord(id = student_id,
-                                              matric_no = matric_no,
-                                             )
-        logger.info('%s edited %s of %s' % (member,context.id,student_id))                                             
-    elif context.portal_type in ("StudentPersonal",):
-        name = "%(firstname)s %(middlename)s %(lastname)s" % ds
-        name = name.strip()
-        name = name.replace('  ',' ')
-        email = ds.get('email')
-        phone = ds.get('phone')
-        student_id = context.getStudentId()
-        #app_doc = context.application.getContent()
-        #jamb_sex = 'M'
-        #if ds.get('sex'):
-        #    jamb_sex = 'F'
-        # originally imported data must be kept; app_doc should not be changed here
-        #app_doc.edit(mapping={'jamb_lastname': name,
-        #                      'jamb_sex': jamb_sex
-        #                      })
-        context.students_catalog.modifyRecord(id = student_id,
-                                              name = name,
-                                              email = email,
-                                              phone = phone,
-                                              sex = ds.get('sex'),
-                                             )
-        logger.info('%s edited %s of %s' % (member,context.id,student_id))
-    elif context.portal_type == "xxxxCourse": # disabled handled by events
-        dd = {}
-        dd.update(ds) # ds is not a real dictionary
-        try:
-            context.courses_catalog.modifyRecord(**dd)
-        except KeyError:
-            context.courses_catalog.addRecord(**dd)
+                                                  entry_mode = entry_mode,
+                                                 )
+            logger.info('%s edited %s of %s' % (member,context.id,student_id))
+        elif context.portal_type == "StudentClearance":
+            matric_no = ds.get('matric_no')
+            student_id = context.getStudentId()
+            context.students_catalog.modifyRecord(id = student_id,
+                                                  matric_no = matric_no,
+                                                 )
+            logger.info('%s edited %s of %s' % (member,context.id,student_id))                                             
+        elif context.portal_type in ("StudentPersonal",):
+            name = "%(firstname)s %(middlename)s %(lastname)s" % ds
+            name = name.strip()
+            name = name.replace('  ',' ')
+            email = ds.get('email')
+            phone = ds.get('phone')
+            student_id = context.getStudentId()
+            #app_doc = context.application.getContent()
+            #jamb_sex = 'M'
+            #if ds.get('sex'):
+            #    jamb_sex = 'F'
+            # originally imported data must be kept; app_doc should not be changed here
+            #app_doc.edit(mapping={'jamb_lastname': name,
+            #                      'jamb_sex': jamb_sex
+            #                      })
+            context.students_catalog.modifyRecord(id = student_id,
+                                                  name = name,
+                                                  email = email,
+                                                  phone = phone,
+                                                  sex = ds.get('sex'),
+                                                 )
+            logger.info('%s edited %s of %s' % (member,context.id,student_id))
+        elif context.portal_type == "xxxxCourse": # disabled handled by events
+            dd = {}
+            dd.update(ds) # ds is not a real dictionary
+            try:
+                context.courses_catalog.modifyRecord(**dd)
+            except KeyError:
+                context.courses_catalog.addRecord(**dd)
     if cpsdocument_edit_and_view_button is not None:
         action = ''
