Ignore:
Timestamp:
15 Oct 2007, 17:03:44 (17 years ago)
Author:
joachim
Message:

new function picturesList in waeup_tool used in clearance_edit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2363 r2364  
    702702    ###)
    703703
     704    security.declarePublic('picturesList') ###(
     705    def picturesList(self):
     706        """check if pictures exist in the filesystem"""
     707        path = 'images'
     708        student_id = self.getStudentId()
     709        picture_path = os.path.join(i_home,path,student_id)
     710        if not os.path.exists(picture_path):
     711            return []
     712        return [picture[:picture.rfind('_')] for picture in os.listdir(picture_path)]
     713    ###)
     714
    704715    security.declarePublic('showFsPicture') ###(
    705716    def showFsPicture(self,path):
Note: See TracChangeset for help on using the changeset viewer.