Index: /WAeUP_SRP/trunk/Academics.py
===================================================================
--- /WAeUP_SRP/trunk/Academics.py	(revision 718)
+++ /WAeUP_SRP/trunk/Academics.py	(revision 719)
@@ -24,5 +24,5 @@
 i_home = Globals.INSTANCE_HOME
 
-def makeCertificateCode(code):
+def makeCertificateCode(code): ###(
     code = code.replace('.','')
     code = code.replace('(','')
@@ -32,4 +32,6 @@
     code = code.replace('_','')
     return code
+
+###)
 
 class AcademicsFolder(CPSDocument): ###(
@@ -105,5 +107,5 @@
                   "bank_code",
                   )
-        format = ' '.join(['%%(%s)s ' % fn for fn in fields])
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
         for faculty in faculties:
             processing = "processing %s" % format
@@ -139,5 +141,5 @@
                   "faculty_code",
                   )
-        format = ' '.join(['%%(%s)s ' % fn for fn in fields])
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
         try:
             deps = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -146,5 +148,5 @@
             return
         no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
-        heading = ' '.join(['"%s"' % fn for fn in fields])
+        heading = ','.join(['"%s"' % fn for fn in fields])
         no_import.write('%s\n' % heading)
         l = self.portal_catalog({'meta_type': "Faculty"})
@@ -200,5 +202,5 @@
                   "session",
                   )
-        format = ' '.join(['%%(%s)s ' % fn for fn in fields])
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
         try:
             courses = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -207,5 +209,5 @@
             return
         no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
-        heading = ' '.join(['"%s"' % fn for fn in fields])
+        heading = ','.join(['"%s"' % fn for fn in fields])
         no_import.write('%s\n' % heading)
         l = self.portal_catalog({'meta_type': "Faculty"})
@@ -272,5 +274,5 @@
                   "admin_status",
                   )
-        format = ' '.join(['%%(%s)s ' % fn for fn in fields])
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
         try:
             courses = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -320,5 +322,5 @@
         if no_import_list:
             no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
-            heading = ' '.join(['"%s"' % fn for fn in fields])
+            heading = ','.join(['"%s"' % fn for fn in fields])
             no_import.write('%s\n' % heading)
             for line in no_import_list:
@@ -345,5 +347,5 @@
                   "core_or_elective",
                   )
-        format = ' '.join(['%%(%s)s ' % fn for fn in fields])
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
         try:
             cert_courses = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -367,5 +369,5 @@
                 logger.info(em)
                 #no_import_list.append(em)
-                no_import_list.append(format % cert_course + "CertificateCourse\n")
+                no_import_list.append(format % cert_course + ',"Certificate"\n')
                 continue
             certificate = certs[code]
@@ -375,5 +377,5 @@
                 logger.info(em)
                 #no_import_list.append(em)
-                no_import_list.append(format % cert_course + "Course\n")
+                no_import_list.append(format % cert_course + ',"Course"\n')
                 continue
             if depid not in d_ids:
@@ -381,5 +383,5 @@
                 logger.info(em)
                 #no_import_list.append(em)
-                no_import_list.append(format % cert_course + "Department\n")
+                no_import_list.append(format % cert_course + ',"Department"\n')
                 continue
             level = cert_course.get('level')
@@ -395,5 +397,5 @@
                 logger.info(msg)
                 #no_import_list.append(msg + "\n")
-                no_import_list.append(format % cert_course + "duplicate\n")
+                no_import_list.append(format % cert_course + ',"duplicate"\n')
                 continue
             l.invokeFactory('CertificateCourse',course_code)
@@ -413,5 +415,5 @@
         if no_import_list:
             no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
-            heading = ' '.join(['"%s"' % fn for fn in fields])
+            heading = ','.join(['"%s"' % fn for fn in fields])
             no_import.write('%s\n' % heading)
             for line in no_import_list:
