Changeset 6301 for main/waeup.sirp/trunk/src
- Timestamp:
- 8 Jun 2011, 21:17:42 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicants.py
r6296 r6301 48 48 super(Applicant, self).__init__() 49 49 #Initialize workflow state... 50 self.setApplicationState('initialized') 51 52 def getApplicationState(self): 53 return IWorkflowState(self).getState() 54 55 def setApplicationState(self, state=None): 56 """Try to set new state. 57 58 Instead of simply setting a value, we fire a transition of a 59 workflow. This might fail if, for instance, the required state 60 is not part of the workflow or unreachable from current state. 61 """ 62 if state == self.getApplicationState(): 63 # Accept staying in the same state, even if workflow does 64 # not allow this. 65 return 66 info = IWorkflowInfo(self) 67 info.fireTransitionToward(state) 68 return 69 70 #application_state = property(getApplicationState, setApplicationState) 50 IWorkflowInfo(self).fireTransition('init') 71 51 72 52 # Set all attributes of Applicant required in IApplicant as field -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r6296 r6301 367 367 readonly = True, 368 368 ) 369 370 #application_state = schema.Choice(371 # title = u'Application Status',372 # default = 'created',373 # values = ['unchecked', 'checked']374 # readonly = True,375 # )376 377 369 screening_score = schema.Int( 378 370 title = u'Screening Score', … … 419 411 omit fields. This has to be done in the respective form page. 420 412 """ 413 application_state = Attribute("The workflow state of an applicant object.") 414 421 415 screening_score = schema.Int( 422 416 title = u'Screening Score', … … 429 423 readonly = True, 430 424 ) 431 course_admitted = schema.TextLine( 432 # XXX: should be choice 425 course_admitted = schema.Choice( 433 426 title = u'Admitted Course of Study', 434 required = False, 435 readonly = True, 436 default = None, 427 source = CertificateSource(), 428 default = None, 429 required = False, 430 readonly = True, 437 431 ) 438 432 entry_session = schema.TextLine(
Note: See TracChangeset for help on using the changeset viewer.