Ignore:
Timestamp:
22 Oct 2007, 20:46:57 (17 years ago)
Author:
joachim
Message:

use waeup_tool.picturesExist for passport check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2413 r2420  
    393393    ###)
    394394
    395     security.declarePublic('loadStudentFoto') ###(
    396     def old____loadStudentFoto(self,student,filename,folder):
     395    def old____loadStudentFoto(self,student,filename,folder): ###(
    397396        "return a student passport picture"
    398397        app = student.application
     
    735734
    736735    security.declarePublic('picturesExist') ###(
    737     def picturesExist(self, ids):
     736    def picturesExist(self, ids,student_id=None):
    738737        """check if pictures exist in the filesystem"""
    739         path = 'images'
    740         student_id = self.getStudentId()
    741         picture_path = os.path.join(i_home,path,student_id)
     738        if student_id is None:
     739            student_id = self.getStudentId()
     740        if student_id is None:
     741            return False
     742        picture_path = os.path.join(images_base,student_id)
    742743        if not os.path.exists(picture_path):
    743744            return False
Note: See TracChangeset for help on using the changeset viewer.