Changeset 2396
- Timestamp:
- 19 Oct 2007, 14:17:29 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTables.py
r2368 r2396 459 459 ###) 460 460 461 security.declarePublic("missingValue")###( 462 def missingValue(self): 463 from Missing import MV 464 return MV 465 ###) 461 466 ###) 462 467 … … 538 543 return 2 539 544 return -3 540 541 545 InitializeClass(PinTable) 542 543 546 ###) 544 547 … … 1083 1086 return 1084 1087 rpl = infos['rpath'].split('/') 1085 if pt == 'Student' and mt == 'CPS Proxy Folder'\ 1086 and event_type == "sys_add_object": 1088 if pt == 'Student' and mt == 'CPS Proxy Folder': 1087 1089 student_id = object.id 1088 try: 1089 self.addRecord(id = student_id) 1090 except ValueError: 1091 pass 1092 return 1090 if event_type == "sys_add_object": 1091 try: 1092 self.addRecord(id = student_id) 1093 except ValueError: 1094 pass 1095 return 1096 elif event_type == 'sys_del_object': 1097 self.deleteRecord(student_id) 1098 #import pdb;pdb.set_trace() 1093 1099 elif pt == 'StudentCourseResult' and mt == 'CPS Proxy Folder': 1094 1100 if event_type not in ("sys_add_object","sys_del_object"): … … 1108 1114 if not registered_courses: 1109 1115 registered_courses = [] 1110 #import pdb;pdb.set_trace()1111 1116 if event_type == "sys_add_object": 1112 1117 if course_id not in registered_courses: -
WAeUP_SRP/base/WAeUPTool.py
r2364 r2396 690 690 ###) 691 691 692 security.declareProtected(ModifyPortalContent,'removePictureFolder') ###( 693 def removePictureFolder(self,student_id): 694 """remove picture_folder by renaming it""" 695 path = 'images' 696 picture_path = os.path.join(i_home,path,student_id) 697 if not os.path.exists(picture_path): 698 return False 699 os.rename(picture_path,picture_path + "_removed") 700 return True 701 ###) 702 703 security.declareProtected(ModifyPortalContent,'restorePictureFolder') ###( 704 def restorePictureFolder(self,student_id): 705 """restore picture_folder by renaming it""" 706 path = 'images' 707 picture_path = os.path.join(i_home,path,student_id) 708 if not os.path.exists(picture_path + "_removed"): 709 return False 710 os.rename(picture_path + "_removed",picture_path) 711 return True 712 ###) 713 692 714 security.declarePublic('picturesExist') ###( 693 715 def picturesExist(self, ids):
Note: See TracChangeset for help on using the changeset viewer.