Changeset 6810


Ignore:
Timestamp:
21 Sep 2011, 13:19:22 (13 years ago)
Author:
Henrik Bettermann
Message:

Add register course list action.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r6808 r6810  
    11451145        return
    11461146
     1147    @grok.action('Register course list')
     1148    def register_courses(self, **data):
     1149        state = IWorkflowState(self.context.getStudent()).getState()
     1150        IWorkflowInfo(self.context.getStudent()).fireTransition('register_courses')
     1151        self.flash('Course list has been registered.')
     1152        self.redirect(self.url(self.context))
     1153        return
     1154
    11471155class CourseTicketAddFormPage2(CourseTicketAddFormPage):
    11481156    """Add a course ticket by student.
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r6809 r6810  
    543543        self.browser.getControl("Remove selected", index=0).click()
    544544        self.assertTrue('Successfully removed' in self.browser.contents)
    545         return
     545        self.browser.getControl("Register course list").click()
     546        self.assertTrue('Course list has been registered' in self.browser.contents)
     547        self.assertEqual(self.student.state, 'courses registered')
     548        return
Note: See TracChangeset for help on using the changeset viewer.