Changeset 2364 for WAeUP_SRP/base
- Timestamp:
- 15 Oct 2007, 17:03:44 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2363 r2364 702 702 ###) 703 703 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 704 715 security.declarePublic('showFsPicture') ###( 705 716 def showFsPicture(self,path): -
WAeUP_SRP/base/skins/waeup_student/clearance_edit.py
r2363 r2364 36 36 #'Sorry, you are not allowed to access this page!' 37 37 if info == None: 38 return REQUEST.RESPONSE.redirect(context.standard_error_message())38 return REQUEST.RESPONSE.redirect(context.standard_error_message()) 39 39 student = info['student'] 40 40 #app = info['app'] … … 49 49 ) 50 50 required_scans = ('fst_sit_scan', 51 'age_dec',52 'birth_certificate',53 51 # 'jamb_slip', 54 52 'ref_let', … … 97 95 psm = "Content changed!" 98 96 logger.info('%s edited clearance object of %s' % (member_id,student_id )) 99 100 97 elif cpsdocument_edit_and_view_button: 101 98 if acknowledge and info['review_state'] == "clearance_pin_entered": 102 missing = False 103 #files = clear_doc.objectIds() 104 # for scan in required_scans: 105 # if scan not in files: 106 # missing = True 107 # break 108 # if not missing: 109 # if not "age_dec" in files and not "birth_certificate" in files: 110 # missing = True 111 if not context.waeup_tool.picturesExist(required_scans): 99 files = context.waeup_tool.picturesList() 100 req_found = [scan for scan in required_scans if scan in files] 101 birth_found = "age_dec" in files or "birth_certificate" in files 102 if not req_found or not birth_found: 112 103 logger.info('%s requested clearance with documents missing' % (student_id)) 113 104 psm = "You have not uploaded all necessary documents to request clearance!"
Note: See TracChangeset for help on using the changeset viewer.