Changeset 1322
- Timestamp:
- 19 Jan 2007, 11:16:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r1321 r1322 903 903 ipath = "%s/import/" % i_home 904 904 names = os.listdir(ipath) 905 #import pdb;pdb.set_trace()906 905 for name in names: 907 906 head,tail = os.path.splitext(name) … … 910 909 and name.find('imported') < 0: 911 910 self.fixEntryModeForReturning(csv_file=head) 912 911 ###) 912 913 913 security.declareProtected(ModifyPortalContent,"fixEntryModeForReturning")###( 914 914 def fixEntryModeForReturning(self,csv_file=None): … … 959 959 if st_cat(matric_no = matric_no): 960 960 student_id = st_cat(matric_no = matric_no)[0].id 961 app = getattr(getattr(students_folder,student_id),'application',None) 962 if app is not None: 963 app_doc = app.getContent() 964 per = getattr(getattr(students_folder,student_id),'personal',None) 965 if per is not None: 966 per_doc = per.getContent() 961 student_obj = getattr(students_folder,student_id,None) 962 if student_obj: 963 app = getattr(student_obj,'application',None) 964 if app is not None: 965 app_doc = app.getContent() 966 per = getattr(student_obj,'personal',None) 967 if per is not None: 968 per_doc = per.getContent() 967 969 student['Mode_of_Entry'] = entry_mode = student.get('Mode of Entry').upper() 968 970 student['Permanent_Address'] = perm_address = student.get('Permanent Address') 969 entry_mode = student['Mode of Entry']971 #import pdb;pdb.set_trace() 970 972 if not entry_mode: 971 973 student['Error'] = "'Mode of Entry' empty"
Note: See TracChangeset for help on using the changeset viewer.