<commit_before><!-- exercises/submissions.html.erb -->

<% content_for :javascript do %>
  <%= javascript_include_tag 'submissions.js' %>
<% end %>

<div class="page-header">
  <div class="dropdown pull-right">
    <a class="dropdown-toggle" data-toggle="dropdown" href="#"><b class="caret"></b></a>
    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
      <li><%= link_to 'Generate example submissions', exercise_create_example_submissions_path(@exercise) %></li>
      <li><%= link_to 'Download submissions', exercise_archive_path(@exercise) %></li>
    </ul>
  </div>
  <h1>
    <%= "#{@course.full_name}" %>
    (<%= "#{@course_instance.name}" %>) -
    <%= @exercise.name %>
  </h1>
</div>

<% if @groups.empty? %>
  <!-- No groups warning -->
  <div class="alert alert-info">
    <p>
      No submissions have been received yet. 
      Give the following link to students for submitting:
      <%= link_to submit_url(@exercise.id), submit_url(@exercise.id) %>
    </p>
  
    <p>
      or <%= link_to 'Generate example submissions', exercise_create_example_submissions_path(@exercise), :class => 'btn' %>
    </p>
  </div>
<% end %>

<% if @exercise.rubric.blank? %>
  <!-- No rubric warning  -->
  <div class="alert alert-info">
    The grading rubric has not been prepared. <%= link_to 'Edit rubric', edit_exercise_rubric_path(@exercise), :class => 'btn' %>
  </div>
<% end %>


<p>
  <b>Deadline:</b>
  <% if @exercise.deadline.blank? %>
    <%= link_to 'No deadline set', edit_exercise_path(@exercise), :class => 'warning' %>
  <% else %>
    <%=l @exercise.deadline %>
  <% end %>
</p>

<p>
  <strong>Group size: </strong>
  <% if @exercise.groupsizemax > @exercise.groupsizemin %>
    <%= @exercise.groupsizemin %> - <%= @exercise.groupsizemax %>
  <% else %>
    <%= @exercise.groupsizemin %>
  <% end %>
</p>

<p><strong>Submit url: </strong><%= link_to submit_url(@exercise.id), submit_url(@exercise.id) %> <span class="hint">- Give this link to students.</span></p>
  
<% unless @groups.empty? %>
  <h2>Submissions</h2>

  <%= form_tag exercise_send_reviews_path(@exercise) %>
  
  <table class="assignments hover-buttons">
    <thead>
      <tr>
        <td>Submission</td>
        <td>Review</td>
        <td>Status</td>
        <td>Grade</td>
      </tr>
    </thead>
    <tbody id="submissions_table">
      <%= render :partial => 'group', :collection => @groups %>
    </tbody>
    <tfoot>
      <tr>
        <td>
        </td>
        <td>
          <button class="btn" id="reviews-select-all" onclick="return false;"> Select all</button>
          <button class="btn" id="reviews-select-finished" onclick="return false;">Select finished</button>
          <button class="btn" id="reviews-select-none" onclick="return false;">Select none</button>
        </td>
        <td></td>
        <td></td>
      </tr>

      <tr class="spacer">
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>

      <tr>
        <td>
        </td>
        <td>
          <p>
            <button type="submit" class='btn btn-default'>
              <i class="icon-envelope"></i> Mail selected reviews
            </button>
          </p>
        </td>
        <td></td>
        <td></td>
      </tr>
    </tfoot>
  </table>
<% end %>
<commit_msg>Show the number of groups<commit_after><!-- exercises/submissions.html.erb -->

<% content_for :javascript do %>
  <%= javascript_include_tag 'submissions.js' %>
<% end %>

<div class="page-header">
  <div class="dropdown pull-right">
    <a class="dropdown-toggle" data-toggle="dropdown" href="#"><b class="caret"></b></a>
    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
      <li><%= link_to 'Generate example submissions', exercise_create_example_submissions_path(@exercise) %></li>
      <li><%= link_to 'Download submissions', exercise_archive_path(@exercise) %></li>
    </ul>
  </div>
  <h1>
    <%= "#{@course.full_name}" %>
    (<%= "#{@course_instance.name}" %>) -
    <%= @exercise.name %>
  </h1>
</div>

<% if @groups.empty? %>
  <!-- No groups warning -->
  <div class="alert alert-info">
    <p>
      No submissions have been received yet. 
      Give the following link to students for submitting:
      <%= link_to submit_url(@exercise.id), submit_url(@exercise.id) %>
    </p>
  
    <p>
      or <%= link_to 'Generate example submissions', exercise_create_example_submissions_path(@exercise), :class => 'btn' %>
    </p>
  </div>
<% end %>

<% if @exercise.rubric.blank? %>
  <!-- No rubric warning  -->
  <div class="alert alert-info">
    The grading rubric has not been prepared. <%= link_to 'Edit rubric', edit_exercise_rubric_path(@exercise), :class => 'btn' %>
  </div>
<% end %>


<p>
  <b>Deadline:</b>
  <% if @exercise.deadline.blank? %>
    <%= link_to 'No deadline set', edit_exercise_path(@exercise), :class => 'warning' %>
  <% else %>
    <%=l @exercise.deadline %>
  <% end %>
</p>

<p>
  <strong>Group size: </strong>
  <% if @exercise.groupsizemax > @exercise.groupsizemin %>
    <%= @exercise.groupsizemin %> - <%= @exercise.groupsizemax %>
  <% else %>
    <%= @exercise.groupsizemin %>
  <% end %>
</p>

<p><strong>Submit url: </strong><%= link_to submit_url(@exercise.id), submit_url(@exercise.id) %> <span class="hint">- Give this link to students.</span></p>
  
<% unless @groups.empty? %>
  <h2>Submissions</h2>

  <%= form_tag exercise_send_reviews_path(@exercise) %>
  
  <table class="assignments hover-buttons">
    <thead>
      <tr>
        <td>Submission</td>
        <td>Review</td>
        <td>Status</td>
        <td>Grade</td>
      </tr>
    </thead>
    <tbody id="submissions_table">
      <%= render :partial => 'group', :collection => @groups %>
    </tbody>
    <tfoot>
      <tr>
        <td><%= @groups.size %> groups
        </td>
        <td>
          <button class="btn" id="reviews-select-all" onclick="return false;"> Select all</button>
          <button class="btn" id="reviews-select-finished" onclick="return false;">Select finished</button>
          <button class="btn" id="reviews-select-none" onclick="return false;">Select none</button>
        </td>
        <td></td>
        <td></td>
      </tr>

      <tr class="spacer">
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>

      <tr>
        <td>
        </td>
        <td>
          <p>
            <button type="submit" class='btn btn-default'>
              <i class="icon-envelope"></i> Mail selected reviews
            </button>
          </p>
        </td>
        <td></td>
        <td></td>
      </tr>
    </tfoot>
  </table>
<% end %>

{'fraction_non_alphanumeric': 0.19924698795180723, 'fraction_numerical': 0.0012048192771084338, 'mean_word_length': 2.687395891171571, 'pattern_counts': {'":': 0, '<': 272, '<?xml version=': 0, '>': 284, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1774546', 'n_tokens_mistral': 2428, 'n_tokens_neox': 2199, 'n_words': 464}