Changeset 15426 for main/waeup.kofa/trunk/src
- Timestamp:
- 24 May 2019, 16:39:08 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r15423 r15426 3603 3603 grok.require('waeup.showStudents') 3604 3604 3605 def update(self): 3606 self.current_academic_session = grok.getSite()[ 3607 'configuration'].current_academic_session 3608 if not self.current_academic_session: 3609 self.flash(_('Current academic session not set.'), type="danger") 3610 self.redirect(self.url(self.context)) 3611 return 3612 3605 3613 @property 3606 3614 def note(self): … … 3634 3642 3635 3643 def render(self): 3636 session = grok.getSite()['configuration'].current_academic_session3637 3644 lecturers = [i['user_title'] for i in self.getUsersWithLocalRoles() 3638 3645 if i['local_role'] == 'waeup.local.Lecturer'] … … 3640 3647 students_utils = getUtility(IStudentsUtils) 3641 3648 return students_utils.renderPDFCourseticketsOverview( 3642 self, 'coursetickets', session, self.data(session), lecturers, 3649 self, 'coursetickets', self.current_academic_session, 3650 self.data(self.current_academic_session), lecturers, 3643 3651 'landscape', 90, self.note) 3644 3652 … … 3650 3658 grok.name('attendance.pdf') 3651 3659 grok.require('waeup.showStudents') 3660 3661 def update(self): 3662 self.current_academic_session = grok.getSite()[ 3663 'configuration'].current_academic_session 3664 if not self.current_academic_session: 3665 self.flash(_('Current academic session not set.'), type="danger") 3666 self.redirect(self.url(self.context)) 3667 return 3652 3668 3653 3669 @property … … 3682 3698 3683 3699 def render(self): 3684 session = grok.getSite()['configuration'].current_academic_session3685 3700 lecturers = [i['user_title'] for i in self.getUsersWithLocalRoles() 3686 3701 if i['local_role'] == 'waeup.local.Lecturer'] … … 3688 3703 students_utils = getUtility(IStudentsUtils) 3689 3704 return students_utils.renderPDFCourseticketsOverview( 3690 self, 'attendance', session, self.data(session), 3705 self, 'attendance', self.current_academic_session, 3706 self.data(self.current_academic_session), 3691 3707 lecturers, 'landscape', 90, self.note) 3692 3708
Note: See TracChangeset for help on using the changeset viewer.