Index: WAeUP_SRP/base/WAeUPTool.py
===================================================================
--- WAeUP_SRP/base/WAeUPTool.py	(revision 2419)
+++ WAeUP_SRP/base/WAeUPTool.py	(revision 2420)
@@ -393,6 +393,5 @@
     ###)
 
-    security.declarePublic('loadStudentFoto') ###(
-    def old____loadStudentFoto(self,student,filename,folder):
+    def old____loadStudentFoto(self,student,filename,folder): ###(
         "return a student passport picture"
         app = student.application
@@ -735,9 +734,11 @@
 
     security.declarePublic('picturesExist') ###(
-    def picturesExist(self, ids):
+    def picturesExist(self, ids,student_id=None):
         """check if pictures exist in the filesystem"""
-        path = 'images'
-        student_id = self.getStudentId()
-        picture_path = os.path.join(i_home,path,student_id)
+        if student_id is None:
+            student_id = self.getStudentId()
+        if student_id is None:
+            return False
+        picture_path = os.path.join(images_base,student_id)
         if not os.path.exists(picture_path):
             return False
Index: WAeUP_SRP/base/skins/cps_custom/logged_in.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/logged_in.py	(revision 2419)
+++ WAeUP_SRP/base/skins/cps_custom/logged_in.py	(revision 2420)
@@ -114,5 +114,8 @@
         # look for passport pictures of returning students
 
-        if s_review_state == 'returning' and 'passport' not in app_doc.objectIds():
+        #if s_review_state == 'returning' and 'passport' not in app_doc.objectIds():
+        # use new test
+        if s_review_state == 'returning' and\
+           not context.waeup_tool.picturesExist(('passport',), student.getId()):
             folder = 'pictures_returning'
             res = context.students_catalog(id = str(member))
@@ -126,5 +129,9 @@
         # look for passport pictures of new students
 
-        if s_review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested')  and 'passport' not in app_doc.objectIds():
+        if s_review_state in ('admitted', 
+                              'clearance_pin_entered', 
+                              'clearance_requested'
+                             )  and not context.waeup_tool.picturesExist(('passport',),
+                                                                         student.getId()):
             folder = 'pictures_admitted_latest'
             filename = app_doc.jamb_reg_no.replace('/','_')
