- Timestamp:
- 7 Jun 2011, 12:16:27 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicants.py
r6198 r6296 25 25 from zope.interface import implementedBy 26 26 from zope.schema.fieldproperty import FieldProperty 27 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 27 28 from waeup.sirp.interfaces import IWAeUPSIRPPluggable 28 29 from waeup.sirp.app import University … … 43 44 grok.implements(IApplicant,IApplicantEdit) 44 45 grok.provides(IApplicant) 46 47 def __init__(self): 48 super(Applicant, self).__init__() 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) 45 71 46 72 # Set all attributes of Applicant required in IApplicant as field -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r6290 r6296 291 291 #readonly = True, 292 292 ) 293 293 294 reg_no = schema.TextLine( 294 295 title = u'JAMB Registration Number', … … 366 367 readonly = True, 367 368 ) 368 status = schema.TextLine( 369 # XXX: should be 'status' type 370 title = u'Application Status', 371 required = False, 372 readonly = True, 373 ) 369 370 #application_state = schema.Choice( 371 # title = u'Application Status', 372 # default = 'created', 373 # values = ['unchecked', 'checked'] 374 # readonly = True, 375 # ) 376 374 377 screening_score = schema.Int( 375 378 title = u'Screening Score', -
main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt
r6247 r6296 853 853 854 854 >>> open('certificates.csv', 'wb').write( 855 ... """code,title,faculty_code,department_code,study_mode,end_level,m_prefix,start_level,application_category ,review_state856 ... LBA,BACHELOR OF LITERATURE,FA,LIT,UG,ug_ft,500,LIT,100,basic ,checked857 ... LMA,MASTER OF LITERATURE,FA,LIT,UG,ug_pt,500,LIT,100,cest ,checked858 ... DME,DIPLOMA OF MATH,FS,MAT,DP,dp_ft,200,DME,100,cest ,unchecked855 ... """code,title,faculty_code,department_code,study_mode,end_level,m_prefix,start_level,application_category 856 ... LBA,BACHELOR OF LITERATURE,FA,LIT,UG,ug_ft,500,LIT,100,basic 857 ... LMA,MASTER OF LITERATURE,FA,LIT,UG,ug_pt,500,LIT,100,cest 858 ... DME,DIPLOMA OF MATH,FS,MAT,DP,dp_ft,200,DME,100,cest 859 859 ... """) 860 860 -
main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py
r6008 r6296 2 2 """ 3 3 import 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 4 from zope.catalog.interfaces import ICatalog 10 5 from zope.component import getUtility 11 6 from zope.component.interfaces import IFactory, ComponentLookupError … … 30 25 self.end_level = end_level 31 26 self.application_category = application_category 32 # Initialize workflow state...33 # self.setReviewState('unchecked')34 27 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 a47 # workflow. This might fail if, for instance, the required state48 # 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 does52 # # not allow this.53 # return54 # info = IWorkflowInfo(self)55 # info.fireTransitionToward(state)56 # return57 58 #review_state = property(getReviewState, setReviewState)59 60 28 def longtitle(self): 61 29 return "%s (%s)" % (self.title,self.code) -
main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py
r6189 r6296 184 184 ) 185 185 186 #review_state = schema.Choice(187 # title = u'Review State',188 # default = 'unchecked',189 # values = ['unchecked', 'checked']190 # )191 192 186 title = schema.TextLine( 193 187 title = u'Title',
Note: See TracChangeset for help on using the changeset viewer.