Changeset 1384 for WAeUP_SRP/trunk/skins
- Timestamp:
- 1 Feb 2007, 09:21:47 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py
r1383 r1384 26 26 if str(member) not in ('admin','joachim') or matric_no is None: 27 27 return 28 29 30 # remove from students_catalog 31 28 32 res = st_cat(matric_no=matric_no) 29 33 if len(res) != 1: … … 31 35 logger.info(msg) 32 36 return msg 37 else: 38 stbrain = res[0] 39 student_id = stbrain.id 40 st_cat.deleteRecord(student_id) 41 msg = "Student with matric_no %s and student_id %s removed from students_catalog" % (matric_no,student_id) 42 output = [] 43 logger.info(msg) 44 output.append(msg) 33 45 34 stbrain = res[0] 35 #from Products.zdb import set_trace;set_trace() 36 student_id = stbrain.id 37 st_cat.deleteRecord(student_id) 38 msg = "Student with matric_no %s and student_id %s removed from returning_import" % (matric_no,student_id) 46 # remove from returning_import 39 47 40 res_deleted = []41 output = []42 48 res_ret = ret_imp(matric_no=matric_no) 43 49 if len(res_ret) != 1: … … 49 55 logger.info(msg) 50 56 output.append(msg) 57 58 # remove from results_import 59 60 res_deleted = [] 51 61 res_res = res_imp(matric_no=matric_no) 52 62 if len(res_res) > 0: … … 59 69 output.append(msg) 60 70 logger.info(msg) 71 72 # remove from directory 73 61 74 if hasattr(stdir, student_id): 62 75 stdir.deleteEntry(student_id) … … 66 79 output.append(msg) 67 80 logger.info(msg) 81 82 # remove objects 83 68 84 if hasattr(students,student_id): 69 85 students.manage_delObjects((student_id),) … … 73 89 output.append(msg) 74 90 logger.info(msg) 91 75 92 return "\n".join(output) 93
Note: See TracChangeset for help on using the changeset viewer.