(self, from_module_uid, to_module_uid, from_index, to_index)
The case type of the two modules conflict, the rearrangement goes through anyway.
        This is intentional.
The case type of the two modules conflict, the rearrangement goes through anyway.
        This is intentional.
The case type of the two modules conflict the rearrangement goes through anyway . This is intentional .
def rearrange_forms(self, from_module_uid, to_module_uid, from_index, to_index):
        """
        The case type of the two modules conflict, the rearrangement goes through anyway.
        This is intentional.

        """
        from_module = self.get_module_by_unique_id(from_module_uid)
        to_module = self.get_module_by_unique_id(to_module_uid)
        try:
            from_module.get_form(from_index).pre_move_hook(from_module, to_module)
        except NotImplementedError:
            pass
        try:
            form = from_module.forms.pop(from_index)
            if not isinstance(form, AdvancedForm):
                if from_module.is_surveys != to_module.is_surveys:
                    if from_module.is_surveys:
                        form.requires = "case"
                        form.actions.update_case = UpdateCaseAction(
                            condition=FormActionCondition(type='always'))
                    else:
                        form.requires = "none"
                        form.actions.update_case = UpdateCaseAction(
                            condition=FormActionCondition(type='never'))
            to_module.add_insert_form(from_module, form, index=to_index, with_source=True)
        except IndexError:
            raise RearrangeError()
def rearrange_forms ( self , from_module_uid , to_module_uid , from_index , to_index ) : from_module = self . get_module_by_unique_id ( from_module_uid ) to_module = self . get_module_by_unique_id ( to_module_uid ) try : from_module . get_form ( from_index ) . pre_move_hook ( from_module , to_module ) except NotImplementedError : pass try : form = from_module . forms . pop ( from_index ) if not isinstance ( form , AdvancedForm ) : if from_module . is_surveys != to_module . is_surveys : if from_module . is_surveys : form . requires = "case" form . actions . update_case = UpdateCaseAction ( condition = FormActionCondition ( type = 'always' ) ) else : form . requires = "none" form . actions . update_case = UpdateCaseAction ( condition = FormActionCondition ( type = 'never' ) ) to_module . add_insert_form ( from_module , form , index = to_index , with_source = True ) except IndexError : raise RearrangeError ( )