Changeset 2675 for WAeUP_SRP/base/WAeUPTool.py
- Timestamp:
- 16 Nov 2007, 09:45:30 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2670 r2675 54 54 images_base = os.path.join(i_home,"images") 55 55 56 def getImagesDir(student_id): 57 return os.path.join("%s" % images_base,student_id[0],student_id) 56 58 57 59 def getObject(object,name): … … 468 470 ###) 469 471 472 470 473 security.declarePublic('loadStudentFoto') ###( 471 474 def loadStudentFoto(self,student,filename,folder): … … 474 477 picture ="%s/import/%s/%s" % (i_home,folder,filename) 475 478 student_id = student.getId() 476 images_dir = os.path.join("%s" % images_base,student_id)479 images_dir = getImagesDir(student_id) 477 480 if not os.path.exists(images_dir): 478 481 os.mkdir(images_dir) … … 847 850 brain.screening_type, 848 851 brain.reg_no) 849 images_dir = os.path.join("%s" % images_base,student_id) 852 images_dir = getImagesDir(student_id) 853 #images_dir = os.path.join("%s" % images_base,student_id) 854 letter_dir,student_dir = os.path.split(images_dir) 855 if not os.path.exists(letter_dir): 856 os.mkdir(letter_dir) 850 857 if not os.path.exists(images_dir): 851 858 os.mkdir(images_dir) … … 946 953 if student_id is None: 947 954 return False 948 picture_path = os.path.join(images_base,student_id) 955 picture_path = getImagesDir(student_id) 956 #picture_path = os.path.join(images_base,student_id) 949 957 if not os.path.exists(picture_path): 950 958 return False … … 967 975 def showFsPicture(self,path): 968 976 """return a picture from the filesystem""" 969 picture_path = os.path.join(i_home,path) 977 #picture_path = os.path.join(i_home,path) 978 picture_path = os.path.join(images_base,path) 970 979 response = self.REQUEST.RESPONSE 971 980 #import pdb;pdb.set_trace() … … 1851 1860 def moveImagesToFS(self,student_id="O738726"): 1852 1861 "move the images to the filesystem" 1853 images_dir = os.path.join("%s" % images_base,student_id) 1862 images_dir = getImagesDir(student_id) 1863 #images_dir = os.path.join("%s" % images_base,student_id) 1854 1864 student_folder = getattr(self.portal_url.getPortalObject().campus.students,student_id) 1855 1865 stool = getToolByName(self, 'portal_schemas')
Note: See TracChangeset for help on using the changeset viewer.