Changeset 16671 for main/waeup.kofa/trunk
- Timestamp:
- 7 Oct 2021, 11:06:40 (3 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r16662 r16671 4 4 1.7.2.dev0 (unreleased) 5 5 ======================= 6 7 * Ease customization of portrait upload conditions. 6 8 7 9 * `OutstandingCoursesExporter`: Remove passed courses from outstanding -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r16609 r16671 2935 2935 2936 2936 def update(self): 2937 PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES 2938 if self.context.student.state not in PORTRAIT_CHANGE_STATES: 2937 if not getUtility(IStudentsUtils).allowPortraitChange(self.context): 2939 2938 emit_lock_message(self, 2940 2939 _('This form is locked. You are in the wrong state.')) -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r16120 r16671 104 104 """ 105 105 106 def allowPortraitChange(student): 107 """Check if student is allowed to change the portrait file. 108 """ 109 106 110 def setMatricNumber(student): 107 111 """Set matriculation number of student. -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r16609 r16671 610 610 return None, matric_number 611 611 612 def allowPortraitChange(self, student): 613 """Check if student is allowed to change the portrait file. 614 """ 615 if student.state not in self.PORTRAIT_CHANGE_STATES: 616 return False 617 return True 618 612 619 def getAccommodationDetails(self, student): 613 620 """Determine the accommodation data of a student. -
main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
r16610 r16671 617 617 @property 618 618 def target_url(self): 619 PORTRAIT_CHANGE_STATES = getUtility( 620 IStudentsUtils).PORTRAIT_CHANGE_STATES 621 if self.context.state not in PORTRAIT_CHANGE_STATES: 619 if not getUtility(IStudentsUtils).allowPortraitChange(self.context): 622 620 return '' 623 621 return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.