Changeset 2263 for WAeUP_SRP


Ignore:
Timestamp:
20 Sep 2007, 17:27:59 (17 years ago)
Author:
Henrik Bettermann
Message:

do not change wf state when mass_edit students

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2259 r2263  
    11201120            editable_keys.remove('matric_no')
    11211121
    1122         # included only to change wf state from admitted to returning
    1123         if res[0].review_state not in ('admitted','objection_raised'):
    1124             return '%s' % res[0].id ,"student is not in state admitted or objection_raised"
    1125         # end inclusion
     1122        ## included only to change wf state from admitted to returning
     1123        #if res[0].review_state not in ('admitted','objection_raised'):
     1124        #    return '%s' % res[0].id ,"student is not in state admitted or objection_raised"
     1125        ## end inclusion
    11261126
    11271127        sid = res[0].id
     
    11291129        f2t = self.field2types_student
    11301130        d = {}
    1131         #import pdb;pdb.set_trace()
    11321131        any_change = False
    11331132        for pt in f2t.keys():
     
    11571156
    11581157
    1159         # included only to change wf state from admitted to returning
    1160             if res[0].review_state in ('admitted','objection_raised'):
    1161                 new_state = f2t[pt]['wf_transition_return']
    1162                 sub_obj = getattr(student_obj,f2t[pt]['id'],None)
    1163                 if sub_obj and new_state != "remain":
    1164                     try:
    1165                         self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
    1166                     except:
    1167                         #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id))
    1168                         pass
    1169         if res[0].review_state in ('admitted','objection_raised'):
    1170             wfaction = 'return'
    1171             try:
    1172                 self.portal_workflow.doActionFor(student_obj,wfaction)
    1173                 logger.info('%s, wf state changed' % sid)
    1174                 any_change = True
    1175             except:
    1176                 logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state))
    1177                 pass
    1178         # end inclusion
     1158        ## included only to change wf state from admitted to returning
     1159        #    if res[0].review_state in ('admitted','objection_raised'):
     1160        #        new_state = f2t[pt]['wf_transition_return']
     1161        #        sub_obj = getattr(student_obj,f2t[pt]['id'],None)
     1162        #        if sub_obj and new_state != "remain":
     1163        #            try:
     1164        #                self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
     1165        #            except:
     1166        #                #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id))
     1167        #                pass
     1168        #if res[0].review_state in ('admitted','objection_raised'):
     1169        #    wfaction = 'return'
     1170        #    try:
     1171        #        self.portal_workflow.doActionFor(student_obj,wfaction)
     1172        #        logger.info('%s, wf state changed' % sid)
     1173        #        any_change = True
     1174        #    except:
     1175        #        logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state))
     1176        #        pass
     1177        ## end inclusion
    11791178
    11801179
     
    12601259                if by_pass_queue is not None:
    12611260                    bypass_queue(bypass_queue_catalog)
    1262                            
     1261
    12631262            dm = DataModel(item, adapters,context=self)
    12641263            ds = DataStructure(data=item,datamodel=dm)
Note: See TracChangeset for help on using the changeset viewer.