Ignore:
Timestamp:
7 Jun 2011, 12:16:27 (13 years ago)
Author:
Henrik Bettermann
Message:

Move workflow methods from certificates to applicants.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py

    r6008 r6296  
    22"""
    33import grok
    4 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    5 try:
    6     from zope.catalog.interfaces import ICatalog
    7 except ImportError:
    8     # BBB
    9     from zope.app.catalog.interfaces import ICatalog
     4from zope.catalog.interfaces import ICatalog
    105from zope.component import getUtility
    116from zope.component.interfaces import IFactory, ComponentLookupError
     
    3025        self.end_level = end_level
    3126        self.application_category = application_category
    32         # Initialize workflow state...
    33         # self.setReviewState('unchecked')
    3427
    35     #def check(self):
    36     #    """Set Review State to ``checked``.
    37     #    """
    38     #    self.setReviewState(state='checked')
    39 
    40     #def getReviewState(self):
    41     #    return IWorkflowState(self).getState()
    42 
    43     #def setReviewState(self, state=None):
    44     #    """Try to set new state.
    45 
    46     #    Instead of simply setting a value, we fire a transition of a
    47     #    workflow. This might fail if, for instance, the required state
    48     #    is not part of the workflow or unreachable from current state.
    49     #    """
    50     #    if state == self.getReviewState():
    51     #        # Accept staying in the same state, even if workflow does
    52     #        # not allow this.
    53     #        return
    54     #    info = IWorkflowInfo(self)
    55     #    info.fireTransitionToward(state)
    56     #    return
    57 
    58     #review_state = property(getReviewState, setReviewState)
    59    
    6028    def longtitle(self):
    6129        return "%s (%s)" % (self.title,self.code) 
  • main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py

    r6189 r6296  
    184184        )
    185185
    186     #review_state = schema.Choice(
    187     #    title = u'Review State',
    188     #    default = 'unchecked',
    189     #    values = ['unchecked', 'checked']
    190     #    )
    191 
    192186    title = schema.TextLine(
    193187        title = u'Title',
Note: See TracChangeset for help on using the changeset viewer.