Changeset 1990


Ignore:
Timestamp:
5 Jul 2007, 11:34:41 (17 years ago)
Author:
Henrik Bettermann
Message:

see comment in ticket #300 (untested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1987 r1990  
    842842        if mapping.get('sex'):
    843843            d['jamb_sex']  = 'F'
     844        transition = mapping.get('reg_transition','admit')
     845        if transition not in ('admit','return'):
     846            transition = 'admit'       
    844847        for pt in f2t.keys():
    845848            student_obj.invokeFactory(pt,f2t[pt]['id'])
     
    855858                        d[zu] = mapping[von]
    856859            sub_doc.edit(mapping = d)
    857             transition = mapping.get('reg_transition','admitted')
    858             if transition not in ('admitted','returning'):
    859                 transition = 'admitted'
     860
    860861            #import pdb;pdb.set_trace()
    861862            new_state = f2t[pt]['wf_transition_%(transition)s' % vars()]
    862863            if new_state != "remain":
    863864                self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
    864         wfaction = 'admit'
    865         self.portal_workflow.doActionFor(student_obj,wfaction)
     865        self.portal_workflow.doActionFor(student_obj,transition)
    866866        student_obj.manage_setLocalRoles(sid, ['Owner',])
    867867        return sid,''
     
    901901        if res[0].review_state != 'admitted':
    902902            return '%s' % res[0].id ,"student is not in state admitted"
    903         # end inclusion   
     903        # end inclusion
    904904
    905905        sid = res[0].id
Note: See TracChangeset for help on using the changeset viewer.