<div class="pull-right">
  <div class="btn-group">
    <% if !@my_module.completed? %>
      <div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
        <button class="btn btn-primary">
          <span class="glyphicon glyphicon-ok"></span>
          <%= t("my_modules.buttons.complete") %>
        </button>
      </div>
    <% else @my_module.completed? %>
      <div data-action="uncomplete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
        <button class="btn btn-greyed">
          <span class="glyphicon glyphicon-remove"></span>
          <%= t("my_modules.buttons.uncomplete") %>
        </button>
      </div>
    <% end %>
  </div>
  <span data-hook="my_module-protocol-buttons"></span>
</div>
<div class="pull-right">
  <% if can_complete_module(@my_module) %>
    <div class="btn-group">
      <% if !@my_module.completed? %>
        <div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
          <button class="btn btn-primary">
            <span class="glyphicon glyphicon-ok"></span>
            <%= t("my_modules.buttons.complete") %>
          </button>
        </div>
      <% elsif @my_module.completed? %>
        <div data-action="uncomplete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
          <button class="btn btn-greyed">
            <span class="glyphicon glyphicon-remove"></span>
            <%= t("my_modules.buttons.uncomplete") %>
          </button>
        </div>
      <% end %>
    </div>
  <% end %>
  <span data-hook="my_module-protocol-buttons"></span>
</div>
Hide complete&uncomplete task buttons if user cannot do it
Hide complete&uncomplete task buttons if user cannot do it

Closes SCI-1091.
