Changeset 15146
- Timestamp:
- 18 Sep 2018, 19:41:05 (6 years ago)
- Location:
- main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser.py
r15143 r15146 1165 1165 return 1166 1166 1167 class StudentTranscriptSignView(UtilityView, grok.View): 1168 """ View to sign transcript 1169 """ 1170 grok.context(IStudentStudyCourse) 1171 grok.name('sign_transcript') 1172 grok.require('waeup.signTranscript') 1173 1174 def update(self, SUBMIT=None): 1175 if self.context.student.state != TRANSVAL: 1176 self.flash(_('Student is in wrong state.'), type="warning") 1177 self.redirect(self.url(self.context)) 1178 return 1179 self.flash(_('Transcript signed.')) 1180 self.redirect(self.url(self.context)) 1181 return 1182 1183 def render(self): 1184 return 1185 1167 1186 class StudentTranscriptReleaseFormPage(KofaEditFormPage): 1168 1187 """ Page to release transcript … … 1230 1249 """ Page to display the student's transcript. 1231 1250 """ 1232 grok.context(IStudentStudyCourse Transcript)1251 grok.context(IStudentStudyCourse) 1233 1252 grok.name('transcript') 1234 1253 grok.require('waeup.viewTranscript') -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/viewlets.py
r15140 r15146 32 32 OnlinePaymentDisplayFormPage, BedTicketDisplayFormPage, 33 33 StudentClearanceEditFormPage, StudentPersonalEditFormPage, 34 PaymentsManageFormPage, StudyCourseTranscriptPage, EditScoresPage ,)34 PaymentsManageFormPage, StudyCourseTranscriptPage, EditScoresPage) 35 35 from waeup.kofa.students.interfaces import ( 36 36 IStudentsContainer, IStudent, IStudentStudyCourse, IStudentStudyLevel, … … 797 797 "validation. \\n\\n" 798 798 "You really want to validate the transcript?'") 799 800 class SignTranscriptActionButton(ManageActionButton): 801 grok.order(9) 802 grok.context(IStudentStudyCourse) 803 grok.view(StudyCourseTranscriptPage) 804 grok.require('waeup.signTranscript') 805 text = _('Sign transcript') 806 target = 'sign_transcript' 807 icon = 'actionicon_transcript.png' 808 809 @property 810 def target_url(self): 811 if self.context.student.state != TRANSVAL: 812 return '' 813 return self.view.url(self.view.context, self.target) 814 815 @property 816 def onclick(self): 817 return "return window.confirm(%s);" % _( 818 "'Signing a transcript cannot be revoked." 819 "\\n\\n" 820 "You really want to sign the transcript?'") 799 821 800 822
Note: See TracChangeset for help on using the changeset viewer.