- Timestamp:
- 6 Jun 2024, 11:11:23 (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/utils.py
r15651 r17811 17 17 ## 18 18 import grok 19 from zope.component import getUtility 20 from waeup.kofa.interfaces import IExtFileStore 19 21 from waeup.kofa.students.utils import StudentsUtils 20 22 from kofacustom.nigeria.interfaces import MessageFactory as _ … … 41 43 # Maximum size of upload files in kB 42 44 MAX_KB = 250 45 46 def allowPortraitChange(self, student): 47 """Check if student is allowed to change the portrait file. 48 """ 49 # Passport pictures must not be editable if application slip 50 # exists. Students are not allowed to change the picture if they passed 51 # the regular Kofa application. 52 slip = getUtility(IExtFileStore).getFileByContext( 53 student, 'application_slip') 54 if student.state not in self.PORTRAIT_CHANGE_STATES or slip is not None: 55 return False 56 return True 57
Note: See TracChangeset for help on using the changeset viewer.