Changeset 1904


Ignore:
Timestamp:
16 Jun 2007, 06:17:44 (17 years ago)
Author:
Henrik Bettermann
Message:

change wf state due import
(not yet tested, please check)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1900 r1904  
    267267        if dict.get('sex'):
    268268            d['jamb_sex']  = 'F'
    269            
     269
    270270        entry_session = dict.get('entry_session')
    271271        if entry_session == self.getSessionId()[-2:]:
     
    273273            wft = 'wf_transition_admitted'
    274274            password = None
    275         else:   
     275        else:
    276276            wfaction = 'return'
    277277            wft = 'wf_transition_returning'
    278278            password = self.generatePassword()
    279             self.makeStudentMember(sid,password)           
    280            
     279            self.makeStudentMember(sid,password)
     280
    281281        for pt in f2t.keys():
    282282            student_obj.invokeFactory(pt,f2t[pt]['id'])
     
    854854                self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
    855855        wfaction = 'admit'
    856 
    857 
    858856        self.portal_workflow.doActionFor(student_obj,wfaction)
    859857        student_obj.manage_setLocalRoles(sid, ['Owner',])
     
    920918                    if changed:
    921919                        sub_doc.edit(mapping = d)
     920
     921        wfaction = 'return'
     922        try:
     923            self.portal_workflow.doActionFor(student_obj,wfaction)
     924            logger.info('%s, wf state changed' % sid)
     925            any_change = True
     926        except:
     927            pass
     928
    922929        if any_change:
    923930            return sid,''
     
    925932            return sid,'not modified'
    926933    ###)
    927 
     934   
     935   
    928936    security.declareProtected(ModifyPortalContent,"importData")###(
    929937    def importData(self,filename,name,edit=False):
Note: See TracChangeset for help on using the changeset viewer.