Changeset 13908 for main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
- Timestamp:
- 10 Jun 2016, 08:15:54 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r13813 r13908 365 365 self.redirect(self.application_url() + rel_link) 366 366 return 367 # Redirect lecturer after login 368 local_roles = get_user_account(self.request).getLocalRoles() 369 if local_roles.has_key('waeup.local.Lecturer'): 370 self.redirect(self.application_url() + '/my_courses') 371 return 367 372 if not self.camefrom: 368 373 self.redirect(self.application_url() + '/index') … … 978 983 return site_roles_userfriendly 979 984 985 class LecturerLandingPage(KofaPage): 986 """Display courses when lecturer logs in. 987 """ 988 grok.name('my_courses') 989 grok.require('waeup.Authenticated') 990 grok.context(IUniversity) 991 grok.template('mycourses') 992 label =_('My Courses') 993 994 @property 995 def academic_session(self): 996 current_academic_session = grok.getSite()[ 997 'configuration'].current_academic_session 998 if current_academic_session: 999 session = academic_sessions_vocab.getTerm( 1000 current_academic_session).title 1001 return session 1002 return _('no academic session set') 1003 1004 @property 1005 def getCourses(self): 1006 local_roles = get_user_account(self.request).getLocalRoles() 1007 return local_roles['waeup.local.Lecturer'] 1008 980 1009 # 981 1010 # Search pages...
Note: See TracChangeset for help on using the changeset viewer.