Ignore:
Timestamp:
27 Aug 2023, 13:01:06 (16 months ago)
Author:
Henrik Bettermann
Message:

See ticket #42 comment 12

Location:
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py

    r17556 r17561  
    240240
    241241    grok.name('examclearance_slip.pdf')
     242    grok.require('waeup.manageStudent')
    242243    omit_fields = (
    243244        'suspended',
     
    257258    form_fields = None
    258259
    259     note = '''
     260    @property
     261    def note(self):
     262        return '''
    260263
    261264
    262265   
    263 You have been cleared to write second semester examination.
    264 '''
     266You have been cleared to write second semester examination for %s/%s session.
     267''' % (self.context.current_session, self.context.current_session + 1)
    265268
    266269    def update(self):
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/tests/test_browser.py

    r17554 r17561  
    2121from StringIO import StringIO
    2222from hurry.workflow.interfaces import IWorkflowState, IWorkflowInfo
     23from mechanize imporLinkNotFoundErrort
    2324from zope.securitypolicy.interfaces import IPrincipalRoleManager
    2425from zope.component.hooks import setSite, clearSite
     
    5455            '...You logged in...', self.browser.contents)
    5556        self.browser.getLink("Base Data").click()
     57        self.assertRaises(
     58            LinkNotFoundError,
     59            self.browser.getLink, 'Download examination clearance slip')
     60        #self.browser.getLink("Download examination clearance slip").click()
     61        # Unidel changed it's mind
     62        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     63        self.browser.getLink("Base Data").click()
    5664        self.browser.getLink("Download examination clearance slip").click()
    5765        self.assertEqual(self.browser.headers['Status'], '200 Ok')
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/viewlets.py

    r17554 r17561  
    3434    grok.context(ICustomStudent)
    3535    grok.view(StudentBaseDisplayFormPage)
    36     grok.require('waeup.viewStudent')
     36    grok.require('waeup.manageStudent')
    3737    text = _('Download examination clearance slip')
    3838    target = 'examclearance_slip.pdf'
Note: See TracChangeset for help on using the changeset viewer.