<commit_before><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><commit_msg>Hide complete&uncomplete task buttons if user cannot do it<commit_after><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>
{'fraction_non_alphanumeric': 0.18305855599772597, 'fraction_numerical': 0.0, 'mean_word_length': 2.9461883408071747, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '923579', 'n_tokens_mistral': 604, 'n_tokens_neox': 558, 'n_words': 89}