Changeset 6801 for main


Ignore:
Timestamp:
20 Sep 2011, 06:07:14 (13 years ago)
Author:
Henrik Bettermann
Message:

Complete student workflow.

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

Legend:

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

    r6800 r6801  
    364364        self.browser.getControl(name="transition").value = ['reset6']
    365365        self.browser.getControl("Save").click()
    366         # The pay_school_fee transition triggers some changes of previously
    367         # set attributes
     366        # In state returning the pay_school_fee transition triggers some
     367        # changes of attributes
    368368        student['studycourse'].certificate = self.certificate
    369369        student['studycourse'].current_session = 2004
     
    372372        self.browser.getControl(name="transition").value = ['pay_school_fee']
    373373        self.browser.getControl("Save").click()
    374         self.assertEqual(student['studycourse'].current_session, 2005)
    375         self.assertEqual(student['studycourse'].current_level, 200)
    376         self.assertEqual(student['studycourse'].current_verdict, '')
     374        self.assertEqual(student['studycourse'].current_session, 2005) # +1
     375        self.assertEqual(student['studycourse'].current_level, 200) # +100
     376        self.assertEqual(student['studycourse'].current_verdict, '') # empty
    377377        self.assertEqual(student['studycourse'].previous_verdict, 'A')
     378        self.browser.getControl(name="transition").value = ['register_courses']
     379        self.browser.getControl("Save").click()
     380        self.browser.getControl(name="transition").value = ['validate_courses']
     381        self.browser.getControl("Save").click()
     382        self.browser.getControl(name="transition").value = ['return']
     383        self.browser.getControl("Save").click()
    378384        return
    379385
  • main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py

    r6742 r6801  
    1818PAID = 'school fee paid'
    1919RETURNING = 'returning'
     20REGISTERED = 'courses registered'
     21VALIDATED = 'courses validated'
    2022
    2123REGISTRATION_TRANSITIONS = (
     
    111113        source = PAID,
    112114        destination = RETURNING),
     115
     116    Transition(
     117        transition_id = 'register_courses',
     118        title = 'Register courses',
     119        msg = 'Courses registered',
     120        source = PAID,
     121        destination = REGISTERED),
     122
     123    Transition(
     124        transition_id = 'reset7',
     125        title = 'Reset to paid',
     126        msg = 'Student record reset to paid',
     127        source = REGISTERED,
     128        destination = PAID),
     129
     130    Transition(
     131        transition_id = 'validate_courses',
     132        title = 'Validate courses',
     133        msg = 'Courses validated',
     134        source = REGISTERED,
     135        destination = VALIDATED),
     136
     137    Transition(
     138        transition_id = 'reset8',
     139        title = 'Reset to paid',
     140        msg = 'Student record reset to paid',
     141        source = VALIDATED,
     142        destination = PAID),
     143
     144    Transition(
     145        transition_id = 'return',
     146        title = 'Return',
     147        msg = 'Returned',
     148        source = VALIDATED,
     149        destination = RETURNING),
     150
     151    Transition(
     152        transition_id = 'reset9',
     153        title = 'Reset to validated',
     154        msg = 'Student record reset to validated',
     155        source = RETURNING,
     156        destination = VALIDATED),
    113157    )
    114158
Note: See TracChangeset for help on using the changeset viewer.