Changeset 14288 for main/waeup.aaue/trunk/src/waeup/aaue/browser
- Timestamp:
- 18 Nov 2016, 07:19:25 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/browser/viewlets.py
r13357 r14288 18 18 19 19 import grok 20 from waeup.kofa.interfaces import IKofaObject 21 from waeup.kofa.browser.viewlets import PrimaryNavTab 20 from waeup.kofa.interfaces import IKofaObject, academic_sessions_vocab 21 from waeup.kofa.browser.viewlets import ( 22 PrimaryNavTab, ManageActionButton, UpdateScoresActionButton) 22 23 from waeup.aaue.interfaces import MessageFactory as _ 23 24 … … 41 42 return self.view.application_url('applicants') + '/checkstatus' 42 43 return 44 45 46 class UpdatePreviousSessionScoresActionButton(UpdateScoresActionButton): 47 """ 'Update scores' button in course. 48 """ 49 grok.name('updateprevscores') 50 target = 'edit_prev_scores' 51 52 @property 53 def target_url(self): 54 ca = grok.getSite()[ 55 'configuration'].current_academic_session 56 if not ca: 57 return '' 58 return self.view.url(self.view.context, self.target) 59 60 @property 61 def text(self): 62 ca = grok.getSite()[ 63 'configuration'].current_academic_session 64 st = academic_sessions_vocab.getTerm(ca-1).title 65 return _('Update session ${a} scores', mapping = {'a':st}) 66
Note: See TracChangeset for help on using the changeset viewer.