Changeset 3805


Ignore:
Timestamp:
8 Dec 2008, 14:16:03 (16 years ago)
Author:
Henrik Bettermann
Message:

first step to resolve tiicket #589

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r3800 r3805  
    12621262        return set(ids).issubset(set(pictures))
    12631263    ###)
     1264   
     1265   
     1266    security.declareProtected(ModifyPortalContent,'findUnusedImageFolders') ###(
     1267    def findUnusedImageFolders(self):
     1268        """check if an unused image folder exists in the filesystem"""
     1269
     1270        ifolders = []
     1271        for i in a:
     1272            picture_path = os.path.join(images_base,i)
     1273            ifolders.extend(os.listdir(picture_path))
     1274        unused_ids = []
     1275        used_ids = []
     1276        for id in ifolders:
     1277            res = self.students_catalog(id=id)
     1278            if not res:
     1279                unused_ids.append(id)
     1280            else:
     1281                used_ids.append(id)
     1282        return unused_ids
     1283       
     1284    ###)   
    12641285
    12651286    security.declarePublic('picturesList') ###(
Note: See TracChangeset for help on using the changeset viewer.