Changeset 1252
- Timestamp:
- 9 Jan 2007, 21:05:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r1168 r1252 854 854 student['matric_no'] = matric_no 855 855 if matric_no == '': 856 student['Error'] = "Empty matric_no" 856 student['Error'] = "Empty matric_no" 857 857 no_import.append( format_error % student) 858 858 continue 859 859 if matric_no in regs or self.returning_import(matric_no = matric_no): 860 student['Error'] = "Duplicate" 860 student['Error'] = "Duplicate" 861 861 no_import.append( format_error % student) 862 862 continue … … 870 870 except ValueError: 871 871 import pdb;pdb.set_trace() 872 student['Error'] = "Duplicate" 872 student['Error'] = "Duplicate" 873 873 no_import.append( format_error % student) 874 874 continue … … 891 891 tr_count = 0 892 892 open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write( 893 '\n'.join( no_import))893 '\n'.join(imported)) 894 894 open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write( 895 895 '\n'.join(no_import)) … … 944 944 key = matric_no+course_id 945 945 if matric_no == '': 946 result['Error'] = "Empty matric_no" 946 result['Error'] = "Empty matric_no" 947 947 no_import.append( format_error % result) 948 948 continue 949 949 if key in regs or self.results_import(key = key): 950 result['Error'] = "Duplicate" 950 result['Error'] = "Duplicate" 951 951 no_import.append( format_error % result) 952 952 continue … … 963 963 except ValueError: 964 964 import pdb;pdb.set_trace() 965 result['Error'] = "Duplicate" 965 result['Error'] = "Duplicate" 966 966 no_import.append( format_error % result) 967 967 continue
Note: See TracChangeset for help on using the changeset viewer.