Changeset 7388
- Timestamp:
- 19 Dec 2011, 07:59:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicant.py
r7376 r7388 30 30 from waeup.sirp.imagestorage import DefaultFileStoreHandler 31 31 from waeup.sirp.interfaces import ( 32 IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, ISIRPUtils) 32 IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, ISIRPUtils, 33 IExtFileStore) 33 34 from waeup.sirp.utils.helpers import attrs_to_fields, get_current_principal 34 35 from waeup.sirp.applicants.interfaces import ( … … 108 109 # Save the certificate 109 110 student['studycourse'].certificate = self.course_admitted 110 # Copy passport image111 self._copyPassportImage(student) 111 112 112 113 # Save application slip (ExportPDFPage) 113 114 114 115 return True, 'Student %s created' % student.student_id 116 117 def _copyPassportImage(self, student): 118 """Copy any passport image over to student location. 119 """ 120 file_store = getUtility(IExtFileStore) 121 appl_file = file_store.getFileByContext(self) 122 stud_file_id = IFileStoreNameChooser(student).chooseName( 123 attr="passport.jpg") 124 file_store.createFile(stud_file_id, appl_file) 125 return 115 126 116 127 # Set all attributes of Applicant required in IApplicant as field
Note: See TracChangeset for help on using the changeset viewer.