<commit_before><% rubric = rubric_summary %>
<% rubric_association ||= nil; editable ||= false; association_object = nil
   edit ||= false; rubic ||= nil; assessing ||= false; assessment ||= nil; brief ||= false %>
<table class="rubric rubric_summary <%= 'free_form' if rubric && rubric.free_form_criterion_comments %>" id="<%= rubric ? "rubric_summary_#{rubric.id}" : "default_rubric_summary" %>" style="<%= 'hidden' unless brief %>">
<thead>
  <tr class="rubric_title" style="<%= hidden if brief %>">
    <th colspan="2">
      <span class="title"><%= rubric.title rescue t('defaults.title', "Title") %></span>
      <span class="id" style="display: none;"><%= rubric.id rescue nbsp %></span>
    </th>
  </tr>
  <tr>
    <th><%= t 'headers.criteria', "Criteria" %></th>
    <th><%= t 'headers.assessment', "Assessment" %></th>
  </tr>
</thead>
<tbody> 
  <% if rubric && rubric.criteria %>
    <% rubric.criteria_object.each do |criterion| %>
      <% rating = assessment.ratings.find{|r| r.criterion_id == criterion.id} rescue nil %>
      <%= render :partial => "shared/rubric_summary_criterion", :object => criterion, :locals => {:assessing => assessing, :assessment_rating => rating, :brief => brief} %>
    <% end %>
  <% else %>
    <%= render :partial => "shared/rubric_summary_criterion", :locals => {:assessing => assessing, :brief => brief} %>
  <% end %>
  <tr class="summary" style="<%= hidden if rubric_association && rubric_association.hide_score_total %>">
    <td colspan="2" style="padding-right: 10px; text-align: right;">
      <%= before_label :total_points, "Total Points" %>
      <%= t :points_out_of, "%{points} out of %{total}",
            :points => %{<span class="rubric_total" style="#{hidden if brief}">#{assessing ? "0" : (rubric.points_possible rescue 5) }</span>},
            :total => %{<span class="points_possible">#{rubric.points_possible rescue 5}</span>} %>
    </td>
  </tr>
</tbody>
</table>
<div class="button-container" style="<%= hidden if brief %>">
  <button class="toggle_full_rubric edit button"><%= t 'buttons.edit_assessment', "Edit Assessment" %></button>
</div>

<commit_msg>fix displaying rubric totals<commit_after><% rubric = rubric_summary %>
<% rubric_association ||= nil; editable ||= false; association_object = nil
   edit ||= false; rubic ||= nil; assessing ||= false; assessment ||= nil; brief ||= false %>
<table class="rubric rubric_summary <%= 'free_form' if rubric && rubric.free_form_criterion_comments %>" id="<%= rubric ? "rubric_summary_#{rubric.id}" : "default_rubric_summary" %>" style="<%= 'hidden' unless brief %>">
<thead>
  <tr class="rubric_title" style="<%= hidden if brief %>">
    <th colspan="2">
      <span class="title"><%= rubric.title rescue t('defaults.title', "Title") %></span>
      <span class="id" style="display: none;"><%= rubric.id rescue nbsp %></span>
    </th>
  </tr>
  <tr>
    <th><%= t 'headers.criteria', "Criteria" %></th>
    <th><%= t 'headers.assessment', "Assessment" %></th>
  </tr>
</thead>
<tbody> 
  <% if rubric && rubric.criteria %>
    <% rubric.criteria_object.each do |criterion| %>
      <% rating = assessment.ratings.find{|r| r.criterion_id == criterion.id} rescue nil %>
      <%= render :partial => "shared/rubric_summary_criterion", :object => criterion, :locals => {:assessing => assessing, :assessment_rating => rating, :brief => brief} %>
    <% end %>
  <% else %>
    <%= render :partial => "shared/rubric_summary_criterion", :locals => {:assessing => assessing, :brief => brief} %>
  <% end %>
  <tr class="summary" style="<%= hidden if rubric_association && rubric_association.hide_score_total %>">
    <td colspan="2" style="padding-right: 10px; text-align: right;">
      <%= before_label :total_points, "Total Points" %>
      <%= t :points_out_of, "*%{points}* out of **%{total}**",
            :points => (assessing ? "0" : (rubric.points_possible rescue 5)),
            :total => (rubric.points_possible rescue 5),
            :wrapper => {
              '*' => "<span class='rubric_total' style='#{hidden if brief}'>\\1</span>",
              '**' => "<span class='points_possible'>\\1</span>"
            }
      %>
    </td>
  </tr>
</tbody>
</table>
<div class="button-container" style="<%= hidden if brief %>">
  <button class="toggle_full_rubric edit button"><%= t 'buttons.edit_assessment', "Edit Assessment" %></button>
</div>


{'fraction_non_alphanumeric': 0.2074480237605666, 'fraction_numerical': 0.003655471784327165, 'mean_word_length': 4.144535840188014, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 140, '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': '4999380', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1433, 'n_words': 341}