Changeset 1725
- Timestamp:
- 30 Apr 2007, 16:44:58 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTables.py
r1724 r1725 557 557 if event_type not in ("sys_add_object","sys_del_object"): 558 558 return 559 #from pdb import set_trace;set_trace()560 559 course_id = object.getId() 561 560 student_id = object.absolute_url_path().split('/')[-4] … … 565 564 student_rec = res[0] 566 565 registered_courses = student_rec.registered_courses 567 if event_type == "sys_add_object": 568 registered_courses.append(course_id) 569 if event_type == "sys_del_object": 570 registered_courses.remove(course_id) 566 if not registered_courses: 567 level_obj = object.aq_parent 568 courses = [] 569 for c in level_obj.objectIds(): 570 if c.endswith('_co'): 571 courses.append(c[:-3]) 572 else: 573 courses.append(c) 574 #from pdb import set_trace;set_trace() 575 registered_courses = courses 576 else: 577 if event_type == "sys_add_object": 578 registered_courses.append(course_id) 579 if event_type == "sys_del_object": 580 if course_id in registered_courses: 581 registered_courses.remove(course_id) 571 582 data['id'] = student_id 572 583 data['registered_courses'] = registered_courses
Note: See TracChangeset for help on using the changeset viewer.