(self, xform, value_responses_map, user_id)
return errors
Update a set of question responses. Returns a list of any
        questions that were not found in the xform.
Update a set of question responses. Returns a list of any
        questions that were not found in the xform.
Update a set of question responses . Returns a list of any questions that were not found in the xform .
def update_responses(self, xform, value_responses_map, user_id):
        """
        Update a set of question responses. Returns a list of any
        questions that were not found in the xform.
        """
        from corehq.form_processor.interfaces.dbaccessors import FormAccessors
        from corehq.form_processor.utils.xform import update_response

        errors = []
        xml = xform.get_xml_element()
        for question, response in value_responses_map.items():
            try:
                update_response(xml, question, response, xmlns=xform.xmlns)
            except XFormQuestionValueNotFound:
                errors.append(question)

        existing_form = FormAccessors(xform.domain).get_with_attachments(xform.get_id)
        existing_form, new_form = self.processor.new_form_from_old(existing_form, xml,
                                                                   value_responses_map, user_id)
        self.save_processed_models([new_form, existing_form])

        return errors
def update_responses ( self , xform , value_responses_map , user_id ) : from corehq . form_processor . interfaces . dbaccessors import FormAccessors from corehq . form_processor . utils . xform import update_response errors = [ ] xml = xform . get_xml_element ( ) for question , response in value_responses_map . items ( ) : try : update_response ( xml , question , response , xmlns = xform . xmlns ) except XFormQuestionValueNotFound : errors . append ( question ) existing_form = FormAccessors ( xform . domain ) . get_with_attachments ( xform . get_id ) existing_form , new_form = self . processor . new_form_from_old ( existing_form , xml , value_responses_map , user_id ) self . save_processed_models ( [ new_form , existing_form ] ) return errors