Changeset 2038
- Timestamp:
- 20 Jul 2007, 04:49:17 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r2016 r2038 1116 1116 logger.error('Error reading %s.csv' % name) 1117 1117 return 1118 total = len(results) 1118 1119 l = self.portal_catalog({'meta_type': "Course"}) 1119 1120 courses = [f.getId for f in l] … … 1183 1184 '\n'.join(no_course_list) + '\n') 1184 1185 no_course_list = [] 1185 em = '%d transactions com mited total %s\n courses not found %s' % (tr_count,total,course_count)1186 em = '%d transactions comitted, %s courses not found ' % (tr_count,course_count) 1186 1187 transaction.commit() 1187 1188 logger.info(em) 1188 1189 regs = [] 1189 1190 total += tr_count 1190 tr_count = 01191 #tr_count = 0 1191 1192 open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write( 1192 1193 '\n'.join(imported)) … … 1196 1197 open("%s/import/%sno_courses%s.csv" % (i_home,name,current),"a").write( 1197 1198 '\n'.join(no_course_list)) 1198 em = '%d transactions commited total %s\n courses not found %s' % (tr_count,total,course_count)1199 em = '%d transactions of %s committed, %s courses not found ' % (tr_count,total,course_count) 1199 1200 logger.info(em) 1200 1201 return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
Note: See TracChangeset for help on using the changeset viewer.