Changeset 2363 for WAeUP_SRP/base/WAeUPTool.py
- Timestamp:
- 15 Oct 2007, 12:04:52 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2354 r2363 690 690 ###) 691 691 692 security.declarePublic('picturesExist') ###( 693 def picturesExist(self, ids): 694 """check if pictures exist in the filesystem""" 695 path = 'images' 696 student_id = self.getStudentId() 697 picture_path = os.path.join(i_home,path,student_id) 698 if not os.path.exists(picture_path): 699 return False 700 pictures = [picture[:picture.rfind('_')] for picture in os.listdir(picture_path)] 701 return set(ids).issubset(set(pictures)) 702 ###) 703 692 704 security.declarePublic('showFsPicture') ###( 693 705 def showFsPicture(self,path): … … 705 717 if os.path.exists(picture_path): 706 718 return open(picture_path).read() 707 708 709 719 ###) 710 720
Note: See TracChangeset for help on using the changeset viewer.