Changeset 3990
- Timestamp:
- 28 Feb 2009, 11:49:23 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPImport.py
r3988 r3990 941 941 field_id = i.replace('student_','') 942 942 non_image_keys[field_id] = [key for key in schema.keys() 943 if schema[key].meta_type != "CPS Image Field"] 943 if schema[key].meta_type != "CPS Image Field"] 944 945 # export field names must be unique but, unfortunately, firstname, middlename and lastname are not 946 # thus we have to omit them 947 non_image_keys['clearance'].remove('firstname') 948 non_image_keys['clearance'].remove('middlename') 949 non_image_keys['clearance'].remove('lastname') 944 950 toexport = non_image_keys 945 951 946 #import pdb;pdb.set_trace()947 952 while True: 948 953 if hasattr(students_folder,student_id): … … 961 966 for f in toexport_for_reimport[k]: 962 967 fields_for_reimport.append(f) 963 if True: #not os.path.exists(export_file):968 if not os.path.exists(export_file): 964 969 headline = ','.join(fields) 965 970 open(export_file,"a").write(headline +'\n') 971 if not os.path.exists(reimport_file): 966 972 headline_for_reimport = ','.join(fields_for_reimport) 967 973 open(reimport_file,"a").write(headline_for_reimport +'\n') … … 990 996 open(reimport_file,"a").write('\n'.join(line_for_reimport) +'\n') 991 997 self.course_results.exportRemoveAllCourses(student_id = student_id, export = True, remove = True) 992 # self.course_results.exportRemoveAllCourses(student_id = student_id, export = True, remove = False)993 998 self.payments_catalog.exportRemoveAllPayments(student_id = student_id, export = True, remove = True) 994 # self.payments_catalog.exportRemoveAllPayments(student_id = student_id, export = True, remove = False)995 999 self.waeup_tool.exportAllStudyLevels(student_id = student_id) 996 1000 # end export
Note: See TracChangeset for help on using the changeset viewer.