Ignore:
Timestamp:
20 Sep 2018, 20:01:55 (6 years ago)
Author:
Henrik Bettermann
Message:

Allow signees to sign only once.
Show signatures on transcript page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser.py

    r15155 r15158  
    11811181            self.redirect(self.url(self.context))
    11821182            return
     1183        prev_transcript_signees = getattr(
     1184            self.context, 'transcript_signees', None)
     1185        if prev_transcript_signees \
     1186            and '(%s)' % self.request.principal.id in prev_transcript_signees:
     1187            self.flash(_('You have already signed this transcript.'),
     1188                type="warning")
     1189            self.redirect(self.url(self.context))
     1190            return
    11831191        self.flash(_('Transcript signed.'))
    11841192        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
     
    11891197        tz = getattr(queryUtility(IKofaUtils), 'tzinfo', pytz.utc)
    11901198        today = now(tz).strftime('%d/%m/%Y %H:%M:%S %Z')
    1191         prev_transcript_signees = getattr(
    1192             self.context, 'transcript_signees', None)
    11931199        if prev_transcript_signees == None:
    11941200            prev_transcript_signees = ''
Note: See TracChangeset for help on using the changeset viewer.