- Timestamp:
- 17 Nov 2016, 21:27:49 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r13935 r14286 34 34 from waeup.kofa.interfaces import ( 35 35 IKofaUtils, IKofaObject, 36 IDataCenter, IUserAccount) 36 IDataCenter, IUserAccount, 37 academic_sessions_vocab) 37 38 from waeup.kofa.utils.helpers import get_user_account 38 39 … … 558 559 grok.require('waeup.editScores') 559 560 icon = 'actionicon_scores.png' 560 text = _('Update scores')561 561 target = 'edit_scores' 562 562 grok.order(4) 563 564 @property 565 def target_url(self): 566 ca = grok.getSite()[ 567 'configuration'].current_academic_session 568 if not ca: 569 return '' 570 return self.view.url(self.view.context, self.target) 571 572 @property 573 def text(self): 574 ca = grok.getSite()[ 575 'configuration'].current_academic_session 576 st = academic_sessions_vocab.getTerm(ca).title 577 return _('Update session ${a} scores', mapping = {'a':st}) 563 578 564 579 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r14285 r14286 3191 3191 self.current_academic_session).title 3192 3192 self.tickets = self._searchCatalog(self.current_academic_session) 3193 self.editable_tickets = [3194 ticket for ticket in self.tickets if ticket.editable_by_lecturer]3195 3193 if not self.tickets: 3196 3194 self.flash(_('No student found.'), type="warning") 3197 3195 self.redirect(self.url(self.context)) 3198 3196 return 3197 self.editable_tickets = [ 3198 ticket for ticket in self.tickets if ticket.editable_by_lecturer] 3199 3199 if not 'UPDATE_TABLE' in form and not 'UPDATE_FILE' in form: 3200 3200 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13936 r14286 3949 3949 self.app['faculties']['fac1']['dep1'].score_editing_disabled = True 3950 3950 self.browser.open(self.course_url) 3951 self.browser.getLink("Update s cores").click()3951 self.browser.getLink("Update session 2004/2005 scores").click() 3952 3952 self.assertTrue('Score editing disabled' in self.browser.contents) 3953 3953 self.app['faculties']['fac1']['dep1'].score_editing_disabled = False 3954 3954 self.browser.open(self.course_url) 3955 self.browser.getLink("Update s cores").click()3955 self.browser.getLink("Update session 2004/2005 scores").click() 3956 3956 self.assertFalse('Score editing disabled' in self.browser.contents) 3957 3957
Note: See TracChangeset for help on using the changeset viewer.