Changeset 6720 for main/waeup.sirp


Ignore:
Timestamp:
12 Sep 2011, 11:30:44 (13 years ago)
Author:
Henrik Bettermann
Message:

Fire transition start_clearance and unlock the clearance form when pressing the Start button.

Extend 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/browser.py

    r6719 r6720  
    667667            # expect an exception
    668668            invalidate_accesscode(pin,comment)
    669 
     669        IWorkflowInfo(self.context).fireTransition('start_clearance')
     670        self.context.application_date = datetime.now()
     671        self.context.clearance_locked = False
    670672        self.flash('Clearance process is started.')
    671         return
     673        self.redirect(self.url(self.context))
     674        return
  • main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py

    r6644 r6720  
    1212CREATED = 'created'
    1313ADMITTED = 'admitted'
     14CLEARANCE = 'clearance'
     15REQUESTED = 'requested'
     16CLEARED = 'cleared'
    1417
    1518REGISTRATION_TRANSITIONS = (
     
    3538        source = ADMITTED,
    3639        destination = CREATED),
     40
     41    Transition(
     42        transition_id = 'start_clearance',
     43        title = 'Start clearance',
     44        msg = 'Clearance started',
     45        source = ADMITTED,
     46        destination = CLEARANCE),
     47
     48    Transition(
     49        transition_id = 'reset2',
     50        title = 'Reset to admitted',
     51        msg = 'Student record reset to admitted',
     52        source = CLEARANCE,
     53        destination = ADMITTED),
     54
     55    Transition(
     56        transition_id = 'request_clearance',
     57        title = 'Request clearance',
     58        msg = 'Clearance requested',
     59        source = CLEARANCE,
     60        destination = REQUESTED),
     61
     62    Transition(
     63        transition_id = 'reset3',
     64        title = 'Reset to clearance',
     65        msg = 'Student record reset to clearance',
     66        source = REQUESTED,
     67        destination = CLEARANCE),
     68
     69    Transition(
     70        transition_id = 'clear',
     71        title = 'Clear student',
     72        msg = 'Cleared',
     73        source = REQUESTED,
     74        destination = CLEARED),
     75
     76    Transition(
     77        transition_id = 'reset4',
     78        title = 'Reset to clearance',
     79        msg = 'Student record reset to clearance',
     80        source = CLEARED,
     81        destination = CLEARANCE),
    3782    )
     83
    3884
    3985registration_workflow = WAeUPWorkflow(REGISTRATION_TRANSITIONS)
Note: See TracChangeset for help on using the changeset viewer.