<commit_before><% if @for_current_user && @domain %>
  <h2>Your Badges at <%= @domain.name %></h2>
<% elsif @user && @domain %>
  <h2>Badges for <%= @user.name || 'User' %> at <%= @domain.name %></h2>
<% end %>
<% if @badges.empty? %>
  <% if @for_current_user %>
    No Data available
  <% else %>
    <p>No Badges Earned or Shared</p>
  <% end %>
<% end %>
<table>
  <% @badges.each do |badge| %>
    <% badge_url = @for_current_user ? "#{request.env['badges.path_prefix'] }/badges/check/#{badge.badge_placement_config_id}/#{badge.user_id}" : "#{ request.env['badges.path_prefix'] }/badges/criteria/#{badge.badge_config_id}/#{badge.config_nonce}?user=#{badge.nonce}" %>
    <tr>
    <td style='padding: 0 5px;'><a href='<%= badge_url %>'><img src='<%= badge.badge_url %>' class='thumbnail' alt='badge image'/></a></td>
    <td style='padding: 0 5px;'><%= badge.name %>
      <% if @for_current_user %>
        <form class='form-inline' action='<%= request.env['badges.path_prefix'] %>/badges/<% badge.nonce %>' style='margin: 0 0 0 15px;'>
        <label><input class='public_badge' <%= 'checked' if badge.public %> type='checkbox'/> show on my Canvas profile</label>
        </form>
      <% end %>
    </td>
    </tr>
  <% end %>
</table>
<% if @for_current_user && !@badges.empty? %>
  <% url = "#{protocol}://#{request.env['badges.domain']}/badges/all/#{params['domain_id']}/#{params['user_id']}" %>
  <br/><form class='form-inline'><label>Share this Page: <input type='text' value='<%= url %>'/></label></form>
<% end %><commit_msg>fix making badge public from index page<commit_after><% if @for_current_user && @domain %>
  <h2>Your Badges at <%= @domain.name %></h2>
<% elsif @user && @domain %>
  <h2>Badges for <%= @user.name || 'User' %> at <%= @domain.name %></h2>
<% end %>
<% if @badges.empty? %>
  <% if @for_current_user %>
    No Data available
  <% else %>
    <p>No Badges Earned or Shared</p>
  <% end %>
<% end %>
<table>
  <% @badges.each do |badge| %>
    <% badge_url = @for_current_user ? "#{request.env['badges.path_prefix'] }/badges/check/#{badge.badge_placement_config_id}/#{badge.user_id}" : "#{ request.env['badges.path_prefix'] }/badges/criteria/#{badge.badge_config_id}/#{badge.config_nonce}?user=#{badge.nonce}" %>
    <tr>
    <td style='padding: 0 5px;'><a href='<%= badge_url %>'><img src='<%= badge.badge_url %>' class='thumbnail' alt='badge image'/></a></td>
    <td style='padding: 0 5px;'><%= badge.name %>
      <% if @for_current_user %>
        <form class='form-inline' action='<%= request.env['badges.path_prefix'] %>/badges/<%= badge.nonce %>' style='margin: 0 0 0 15px;'>
        <label><input class='public_badge' <%= 'checked' if badge.public %> type='checkbox'/> show on my Canvas profile</label>
        </form>
      <% end %>
    </td>
    </tr>
  <% end %>
</table>
<% if @for_current_user && !@badges.empty? %>
  <% url = "#{protocol}://#{request.env['badges.domain']}/badges/all/#{params['domain_id']}/#{params['user_id']}" %>
  <br/><form class='form-inline'><label>Share this Page: <input type='text' value='<%= url %>'/></label></form>
<% end %>
{'fraction_non_alphanumeric': 0.24444444444444444, 'fraction_numerical': 0.008373590982286634, 'mean_word_length': 4.1338842975206616, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, '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': '1641813', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1157, 'n_words': 222}