<commit_before><% cache(['submission_sidebar_render', @current_user_submission, Time.zone.utc_offset].cache_key) do %>
<div class="details">
  <h3 style="margin: 0;"><%= t 'titles.submission', "Submission" %></h3>
  <div class="header" style="font-weight: bold; font-size: 1.2em;"><%= image_tag "graded.png" %> <%= t 'titles.submission_turned_in', "Turned In!" %></div>
  <div style="padding-left: 5px;">
    <span style="<%= "color: #800; font-weight: bold;" if @current_user_submission.late? %>">
      <% if @current_user_submission.late? %>
        <%= t 'messages.submission_late_timestamp', "%{submitted_at} (late)", :submitted_at => datetime_string(@current_user_submission.submitted_at) %>
      <% else %>
        <%= datetime_string(@current_user_submission.submitted_at) %>
      <% end %>
    </span>
    <br/>
    
    <a href="<%= context_url(@assignment.context, :context_assignment_submission_url, @assignment.id, @current_user.id) %>" class='forward'><%= t 'links.submission.details', "Submission Details" %></a><br/>
    <% if @current_user_submission.submission_type == "online_url" %>
      <a href="<%= @current_user_submission.url %>" target="_new" class='link'><%= t 'links.submission.view_original_page', "View the Original Page" %></a><br/>
    <% elsif @current_user_submission.submission_type == "online_text_entry" %>
      <a href="<%= context_url(@assignment.context, :context_assignment_submission_url, @assignment.id, @current_user.id) %>" target="_new" class='text-entry'><%= t 'links.submission.view_original_entry', "View the Original Entry" %></a><br/>
    <% elsif @current_user_submission.submission_type == "online_upload" %>
      <% @current_user_submission.attachments.each do |attachment| %>
        <a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, @current_user_submission.user_id, :download => attachment.id) %>" class='file-big'><%= t 'links.submission.download_attachment', "Download %{attachment_display_name}", :attachment_display_name => attachment.display_name %></a><br/>
      <% end %>
    <% elsif @current_user_submission.submission_type == "online_quiz" %>
      <a href="<%= context_url(@assignment.context, :context_quiz_url, @assignment.quiz.id) %>" target="_new" class='quiz'>
        <%= @assignment.quiz.survey? ? t('links.submission.view_survey', "View the Survey Submission") :
          t('links.submission.view_quiz', "View the Quiz Submission") %></a><br />
    <% end %>
    <% if @current_user_submission.grade && !@assignment.muted? %>
      <br/>
      <%= t 'labels.grade', "Grade: %{grade} *(%{points_possible} pts possible)*", :grade => @current_user_submission.grade,
        :points_possible => @assignment.points_possible, :wrapper => '<span style="font-size: 0.8em;">\1</span>' %>
    <% end %>
    <% if @current_user_submission.rubric_assessment %>
      <a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, @current_user_submission.user_id) %>#rubric" class='rubric'><%= t 'links.view_rubric_evaluation', "View Rubric Evaluation" %></a>
    <% end %>
    <% if @assignment.has_peer_reviews? && @current_user_submission.user == @current_user %>
      <br/><b><%= t 'titles.assigned_peer_reviews', "Assigned Peer Reviews" %></b>
      <ul class="unstyled_list" style="margin: 5px 10px 10px;">
        <li style="<%= hidden unless @current_user_submission.assigned_assessments.empty? %>"><%= t 'labels.none_assigned', "None Assigned" %></li>
        <% @current_user_submission.assigned_assessments.each do |assessment| %>
          <li><a <%= assessment.completed? ? "class='pass' title='#{t 'tooltips.finished', "finished"}'" : "class='warning' title='#{t 'tooltips.incomplete', "incomplete"}'" %> href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, assessment.asset.user_id) %> ">
            <%= assessment.asset_user_name %>
          </a></li>
        <% end %>
      </ul>
    <% end %>
    <div style="font-size: 0.8em; padding-top: 10px; max-height: 300px; overflow: auto;"><b><%= t 'titles.comments', "Comments:" %> </b>
      <%= t('messages.no_comments', "No Comments") if @current_user_submission.submission_comments.empty? %>
      <% @current_user_submission.submission_comments.each do |comment| %>
        <div style="margin-left: 10px;">
          <%= comment.comment %>
          <div class="comment_attachments" style="text-align: right; margin-right: 10px;">
            <% comment.attachments.each do |attachment| %>
              <div class="comment_attachment">
                <a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, @current_user_submission.user_id, :comment_id => comment.id, :download => attachment.id) %>" class="comment_attachment_link"><%= image_tag "file.png", :style => "height: 12px;" %> <%= t 'links.download_attachment', "Download %{attachment_display_name}", :attachment_display_name => attachment.display_name %></a>
              </div>
            <% end %>
          </div>
          <div style="font-size: 0.8em; text-align: right; color: #888;">
            <%= t :comment_signature, "%{author}, %{created_at}", :author => comment.author_name, :created_at => datetime_string(comment.created_at) %>
          </div>
        </div>
      <% end %>
    </div>
  </div>
</div>
<% end %>
<% if can_do(@assignment, @current_user, :submit) %>
  <div class="rs-margin-lr">
    <a href="#" class="submit_assignment_link resubmit_link add <%= 'late' if @current_user_submission && @current_user_submission.late? %>"><%= t 'links.resubmit', "Re-submit Assignment" %></a><br/>
  </div>
<% end %><commit_msg>better styling of right side of submission details page<commit_after><% cache(['submission_sidebar_render', @current_user_submission, Time.zone.utc_offset].cache_key) do %>
<div class="details">
  <h3 style="margin: 0;"><%= t 'titles.submission', "Submission" %></h3>
  <div class="header" style="font-weight: bold; font-size: 1.2em;"><%= image_tag "graded.png" %> <%= t 'titles.submission_turned_in', "Turned In!" %></div>
  <div style="padding-left: 5px;">
    <span style="<%= "color: #800; font-weight: bold;" if @current_user_submission.late? %>">
      <% if @current_user_submission.late? %>
        <%= t 'messages.submission_late_timestamp', "%{submitted_at} (late)", :submitted_at => datetime_string(@current_user_submission.submitted_at) %>
      <% else %>
        <%= datetime_string(@current_user_submission.submitted_at) %>
      <% end %>
    </span>
    <br/>
    
    <a href="<%= context_url(@assignment.context, :context_assignment_submission_url, @assignment.id, @current_user.id) %>" class='forward'><%= t 'links.submission.details', "Submission Details" %></a><br/>
    <% if @current_user_submission.submission_type == "online_url" %>
      <a href="<%= @current_user_submission.url %>" target="_new" class='link'><%= t 'links.submission.view_original_page', "View the Original Page" %></a><br/>
    <% elsif @current_user_submission.submission_type == "online_text_entry" %>
      <a href="<%= context_url(@assignment.context, :context_assignment_submission_url, @assignment.id, @current_user.id) %>" target="_new" class='text-entry'><%= t 'links.submission.view_original_entry', "View the Original Entry" %></a><br/>
    <% elsif @current_user_submission.submission_type == "online_upload" %>
      <% @current_user_submission.attachments.each do |attachment| %>
        <a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, @current_user_submission.user_id, :download => attachment.id) %>" class='file-big'><%= t 'links.submission.download_attachment', "Download %{attachment_display_name}", :attachment_display_name => attachment.display_name %></a><br/>
      <% end %>
    <% elsif @current_user_submission.submission_type == "online_quiz" %>
      <a href="<%= context_url(@assignment.context, :context_quiz_url, @assignment.quiz.id) %>" target="_new" class='quiz'>
        <%= @assignment.quiz.survey? ? t('links.submission.view_survey', "View the Survey Submission") :
          t('links.submission.view_quiz', "View the Quiz Submission") %></a><br />
    <% end %>
    <% if @current_user_submission.grade && !@assignment.muted? %>
      <br/>
      <%= t 'labels.grade', "Grade: %{grade} *(%{points_possible} pts possible)*", :grade => @current_user_submission.grade,
        :points_possible => @assignment.points_possible, :wrapper => '<span style="font-size: 0.8em;">\1</span>' %>
    <% end %>
    <% if @current_user_submission.rubric_assessment %>
      <a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, @current_user_submission.user_id) %>#rubric" class='rubric'><%= t 'links.view_rubric_evaluation', "View Rubric Evaluation" %></a>
    <% end %>
    <% if @assignment.has_peer_reviews? && @current_user_submission.user == @current_user %>
      <br/><b><%= t 'titles.assigned_peer_reviews', "Assigned Peer Reviews" %></b>
      <ul class="unstyled_list" style="margin: 5px 10px 10px;">
        <li style="<%= hidden unless @current_user_submission.assigned_assessments.empty? %>"><%= t 'labels.none_assigned', "None Assigned" %></li>
        <% @current_user_submission.assigned_assessments.each do |assessment| %>
          <li><a <%= assessment.completed? ? "class='pass' title='#{t 'tooltips.finished', "finished"}'" : "class='warning' title='#{t 'tooltips.incomplete', "incomplete"}'" %> href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, assessment.asset.user_id) %> ">
            <%= assessment.asset_user_name %>
          </a></li>
        <% end %>
      </ul>
    <% end %>
    <div style="font-size: 11px; padding-top: 10px; max-height: 300px; overflow: auto;"><b><%= t 'titles.comments', "Comments:" %> </b>
      <%= t('messages.no_comments', "No Comments") if @current_user_submission.submission_comments.empty? %>
      <% @current_user_submission.submission_comments.each do |comment| %>
        <div style="margin-left: 10px;">
          <%= comment.comment %>
          <div class="comment_attachments">
            <% comment.attachments.each do |attachment| %>
              <div class="comment_attachment">
                <a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, @current_user_submission.user_id, :comment_id => comment.id, :download => attachment.id) %>" class="comment_attachment_link <%= attachment.mime_class %>"><%= attachment.display_name %></a>
              </div>
            <% end %>
          </div>
          <div style="font-size: 0.8em; text-align: right; color: #888;">
            <%= t :comment_signature, "%{author}, %{created_at}", :author => comment.author_name, :created_at => datetime_string(comment.created_at) %>
          </div>
        </div>
      <% end %>
    </div>
  </div>
</div>
<% end %>
<% if can_do(@assignment, @current_user, :submit) %>
  <div class="rs-margin-lr">
    <a href="#" class="submit_assignment_link resubmit_link add <%= 'late' if @current_user_submission && @current_user_submission.late? %>"><%= t 'links.resubmit', "Re-submit Assignment" %></a><br/>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.18802427271104766, 'fraction_numerical': 0.0058897019453864, 'mean_word_length': 4.445578231292517, 'pattern_counts': {'":': 0, '<': 245, '<?xml version=': 0, '>': 267, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820037', 'n_tokens_mistral': 3949, 'n_tokens_neox': 3649, 'n_words': 665}