Changeset 2420
- Timestamp:
- 22 Oct 2007, 20:46:57 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2413 r2420 393 393 ###) 394 394 395 security.declarePublic('loadStudentFoto') ###( 396 def old____loadStudentFoto(self,student,filename,folder): 395 def old____loadStudentFoto(self,student,filename,folder): ###( 397 396 "return a student passport picture" 398 397 app = student.application … … 735 734 736 735 security.declarePublic('picturesExist') ###( 737 def picturesExist(self, ids ):736 def picturesExist(self, ids,student_id=None): 738 737 """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) 742 743 if not os.path.exists(picture_path): 743 744 return False -
WAeUP_SRP/base/skins/cps_custom/logged_in.py
r2412 r2420 114 114 # look for passport pictures of returning students 115 115 116 if s_review_state == 'returning' and 'passport' not in app_doc.objectIds(): 116 #if s_review_state == 'returning' and 'passport' not in app_doc.objectIds(): 117 # use new test 118 if s_review_state == 'returning' and\ 119 not context.waeup_tool.picturesExist(('passport',), student.getId()): 117 120 folder = 'pictures_returning' 118 121 res = context.students_catalog(id = str(member)) … … 126 129 # look for passport pictures of new students 127 130 128 if s_review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested') and 'passport' not in app_doc.objectIds(): 131 if s_review_state in ('admitted', 132 'clearance_pin_entered', 133 'clearance_requested' 134 ) and not context.waeup_tool.picturesExist(('passport',), 135 student.getId()): 129 136 folder = 'pictures_admitted_latest' 130 137 filename = app_doc.jamb_reg_no.replace('/','_')
Note: See TracChangeset for help on using the changeset viewer.