def enable_participant(self, user, user_to_enable, note):
        """
        Mark the user_to_enable as enabled. Must include a note explaining
        reasons for this action. Also the 'user' arg is used for logging who
        carried this out
        """
        if not note:
            raise UnableToEnableParticipant, __('Must supply a reason for'\
                    ' enabling a disabled participant. None given.')
        try:
            p_as_user = Participant.objects.get(workflowactivity=self, 
                            user=user, disabled=False)
            p_to_enable = Participant.objects.get(workflowactivity=self, 
                    user=user_to_enable)
            if p_to_enable.disabled:
                p_to_enable.disabled = False 
                p_to_enable.save()
                name = user_to_enable.get_full_name() if user_to_enable.get_full_name() else user_to_enable.username
                note = _('Participant %s enabled with the reason: %s')%(name, 
                        note)
                current_state = self.current_state().state if self.current_state() else None
                deadline = self.current_state().deadline if self.current_state() else None
                wh = WorkflowHistory(
                            workflowactivity=self,
                            state=current_state,
                            log_type=WorkflowHistory.ROLE,
                            participant=p_as_user,
                            note=note,
                            deadline=deadline
                            )
                wh.save()
                return wh
            else:
                # The participant is already enabled
                return None
        except __HOLE__:
            # If we can't find the participant then there is nothing to do
            return None
dataset/ETHPy150Open ntoll/workflow/workflow/models.py/WorkflowActivity.enable_participant