- Timestamp:
- 31 Mar 2021, 20:52:44 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r16439 r16440 23 23 from zope.formlib.textwidgets import BytesDisplayWidget 24 24 from zope.component import getUtility 25 from zope.event import notify26 25 from hurry.workflow.interfaces import IWorkflowInfo 27 from waeup.kofa.utils.helpers import get_current_principal28 26 from waeup.kofa.interfaces import ( 29 27 REQUESTED, IExtFileStore, IKofaUtils, IObjectHistory) … … 39 37 ExportPDFTranscriptSlip, 40 38 PaymentsManageFormPage, 41 StartClearancePage, 42 StudyCourseManageFormPage) 39 StartClearancePage) 43 40 from waeup.kofa.students.workflow import (CREATED, ADMITTED, PAID, 44 41 CLEARANCE, REQUESTED, RETURNING, CLEARED, REGISTERED, VALIDATED, … … 502 499 self.flash(_('Current level not available for certificate.')) 503 500 return 501 #notify(grok.ObjectModifiedEvent(self.context.__parent__)) 504 502 return 505 503 … … 518 516 def view_scores_allowed(self): 519 517 return checkPermission('waeup.manageStudent', self.context) 520 521 class CustomStudyCourseManageFormPage(StudyCourseManageFormPage):522 """ Page to edit the student study course data523 """524 525 @action(_('Save'), style='primary')526 def save(self, **data):527 user = get_current_principal()528 if user.id not in ('admin', 'med', 'zope.mgr', 'zope.manager',529 'benamechi', 'tbazuaye'):530 if data['previous_verdict'] == 'R' and self.context.previous_verdict != 'R':531 self.flash(_('You are not entitled to assign this verdict.'),532 type="warning")533 return534 if data['current_verdict'] == 'R' and self.context.current_verdict != 'R':535 self.flash(_('You are not entitled to assign this verdict.'),536 type="warning")537 return538 try:539 msave(self, **data)540 except ConstraintNotSatisfied:541 # The selected level might not exist in certificate542 self.flash(_('Current level not available for certificate.'),543 type="warning")544 return545 #notify(grok.ObjectModifiedEvent(self.context.__parent__))546 return547 518 548 519 class CustomExportPDFCourseRegistrationSlip(
Note: See TracChangeset for help on using the changeset viewer.