<commit_before><% # UI LIBRARIES %>
<%= javascript_include_tag "livepipe/livepipe.js",
  "livepipe/window.js" %>

<script type="text/javascript">
//<![CDATA[

  var invite_modal = null;

  function invite(){
    invite_modal.open();
    $('invite_member').setValue('');
    $('invite_member').focus();
    return false;
  }

  document.observe("dom:loaded", function(){
    invite_modal = new Control.Modal($('invite_dialog'), {
      overlayOpacity: 0.75,
      className: 'invite_modal',
      fade: false
    });
  });
//]]>
</script>

<div id="title_bar">
  <h1><%=h I18n.t("student.assignment", :short_identifier => @assignment.short_identifier) %></h1>
</div>

<div class="column_floatLeft">
  <div class="block">
    <h2><%= I18n.t("submissions") %></h2>
    <div class="block_content">
      <% if !@grouping.nil? %>
        <% if !@grouping.is_valid? %>
          <p class="notice">
            <%= I18n.t("student.group_not_valid") %>
          </p>
        <% end %>
        <h3><%= I18n.t("student.overview") %></h3>
        <div class="info">
          <%=raw( I18n.t("student.last_revision_date",
                        :last_modified_date => I18n.l(@last_modified_date,
                        :format => :long_date)) )%>
        </div>
        <span class="info_number">
          <%=h @num_submitted_files.to_s %>
        </span>
        <span class="info"><%= I18n.t("student.files") %></span> <br />
        <%=raw( I18n.t("student.missing_required_files",
                    :missing_files => @num_missing_assignment_files.to_s) )%>
        <br />
      <% else %>
        <p class="notice"><%= I18n.t("student.no_submission_yet") %></p>
      <% end %>
    </div>
  </div>
  <div class="block">
    <%= render :partial => 'read'%>
  </div>
</div>

<div class="column_floatLeft">
  <div class="block">
    <h2><%= I18n.t("student.group_information") %></h2>
    <div class="block_content">
      <% if @grouping.nil? %>
        <p class="notice">
          <%= I18n.t("student.no_group_yet") %>
          <% if @assignment.past_collection_date? %>
            <%= I18n.t("student.grace_date_passed") %>
          <% end %>!
        </p>

        <%
        # Test if the student can form groupings or not
        if @assignment.student_form_groups == false %>
          <p>
            <%= I18n.t("student.not_allowed_to_form_group") %>
          </p>
        <% end %>

        <%
        # See if the student has been invited to some group

        if @student.has_pending_groupings_for?(@assignment.id) %>
          <h3><%= I18n.t("student.invitations") %></h3>

          <% if flash[:fail_notice] && !flash[:fail_notice].empty? %>
            <div class="notice">
              <%=flash[:fail_notice]%>
            </div>
          <% end %>

          <% @pending_grouping.each do |grouping|%>
          <div class="sub_block">
            <p><%= I18n.t("student.invited_by", :inviter_last_name => h(grouping.inviter.last_name), :inviter_first_name => h(grouping.inviter.first_name)) %>
            </p>
            <% grouping.student_memberships.each do |member|%>
              <ul>
                  <%= render :partial => "assignments/member", :locals =>
                    {:member => member, :grouping => grouping} %>
              </ul>
            <% end -%>

            <%= link_to I18n.t(:join), :action => 'join_group',
                    :id => @assignment.id,
              :grouping_id => grouping.id
            %>
            <%= link_to(I18n.t(:refuse),{:action => 'decline_invitation',
              :id => @assignment.id, :grouping_id => grouping.id},
              {:class => "delete",:confirm =>
              I18n.t("student.decline_invitation")})
            %>
            </div>
            <div class="block_line"></div>
          <% end %>
        <% end %>

        <%
        # If students are allowed to form groups and
        # the grace period for this assignment has not yet passed,
        # render UI elements for group creation

        if !@assignment.past_collection_date? &&
           @assignment.student_form_groups %>

          <h3><%= I18n.t("student.form_own_group") %></h3>
          <p><%= I18n.t("student.form_group", :group_min => h(@assignment.group_min), :group_max => h(@assignment.group_max)) %>
          </p>

          <% if @assignment.group_min == 1 %>
            <p>
              <%= link_to I18n.t("student.work_alone"),
                {:action => 'creategroup', :id => @assignment.id, :workalone => 'true'}%>
            </p>
          <% end %>
          <p>
          <% if @student.has_pending_groupings_for?(@assignment.id)%>
            <%= link_to(I18n.t(:create),{:action => 'creategroup',
               :id => @assignment.id},{:confirm =>
               I18n.t("student.decline_invitation2")})
            %>
          <% else %><commit_msg>Fixed raw html output on student group page<commit_after><% # UI LIBRARIES %>
<%= javascript_include_tag "livepipe/livepipe.js",
  "livepipe/window.js" %>

<script type="text/javascript">
//<![CDATA[

  var invite_modal = null;

  function invite(){
    invite_modal.open();
    $('invite_member').setValue('');
    $('invite_member').focus();
    return false;
  }

  document.observe("dom:loaded", function(){
    invite_modal = new Control.Modal($('invite_dialog'), {
      overlayOpacity: 0.75,
      className: 'invite_modal',
      fade: false
    });
  });
//]]>
</script>

<div id="title_bar">
  <h1><%=h I18n.t("student.assignment", :short_identifier => @assignment.short_identifier) %></h1>
</div>

<div class="column_floatLeft">
  <div class="block">
    <h2><%= I18n.t("submissions") %></h2>
    <div class="block_content">
      <% if !@grouping.nil? %>
        <% if !@grouping.is_valid? %>
          <p class="notice">
            <%= I18n.t("student.group_not_valid") %>
          </p>
        <% end %>
        <h3><%= I18n.t("student.overview") %></h3>
        <div class="info">
          <%=raw( I18n.t("student.last_revision_date",
                        :last_modified_date => I18n.l(@last_modified_date,
                        :format => :long_date)) )%>
        </div>
        <span class="info_number">
          <%=h @num_submitted_files.to_s %>
        </span>
        <span class="info"><%= I18n.t("student.files") %></span> <br />
        <%=raw( I18n.t("student.missing_required_files",
                    :missing_files => @num_missing_assignment_files.to_s) )%>
        <br />
      <% else %>
        <p class="notice"><%= I18n.t("student.no_submission_yet") %></p>
      <% end %>
    </div>
  </div>
  <div class="block">
    <%= render :partial => 'read'%>
  </div>
</div>

<div class="column_floatLeft">
  <div class="block">
    <h2><%= I18n.t("student.group_information") %></h2>
    <div class="block_content">
      <% if @grouping.nil? %>
        <p class="notice">
          <%= I18n.t("student.no_group_yet") %>
          <% if @assignment.past_collection_date? %>
            <%= I18n.t("student.grace_date_passed") %>
          <% end %>!
        </p>

        <%
        # Test if the student can form groupings or not
        if @assignment.student_form_groups == false %>
          <p>
            <%= I18n.t("student.not_allowed_to_form_group") %>
          </p>
        <% end %>

        <%
        # See if the student has been invited to some group

        if @student.has_pending_groupings_for?(@assignment.id) %>
          <h3><%= I18n.t("student.invitations") %></h3>

          <% if flash[:fail_notice] && !flash[:fail_notice].empty? %>
            <div class="notice">
              <%=flash[:fail_notice]%>
            </div>
          <% end %>

          <% @pending_grouping.each do |grouping|%>
          <div class="sub_block">
            <p><%= I18n.t("student.invited_by", :inviter_last_name => h(grouping.inviter.last_name), :inviter_first_name => h(grouping.inviter.first_name)) %>
            </p>
            <% grouping.student_memberships.each do |member|%>
              <ul>
                  <%= render :partial => "assignments/member", :locals =>
                    {:member => member, :grouping => grouping} %>
              </ul>
            <% end -%>

            <%= link_to I18n.t(:join), :action => 'join_group',
                    :id => @assignment.id,
              :grouping_id => grouping.id
            %>
            <%= link_to(I18n.t(:refuse),{:action => 'decline_invitation',
              :id => @assignment.id, :grouping_id => grouping.id},
              {:class => "delete",:confirm =>
              I18n.t("student.decline_invitation")})
            %>
            </div>
            <div class="block_line"></div>
          <% end %>
        <% end %>

        <%
        # If students are allowed to form groups and
        # the grace period for this assignment has not yet passed,
        # render UI elements for group creation

        if !@assignment.past_collection_date? &&
           @assignment.student_form_groups %>

          <h3><%= I18n.t("student.form_own_group") %></h3>
          <p><%= raw(I18n.t("student.form_group", 
                    :group_min => h(@assignment.group_min), 
                    :group_max => h(@assignment.group_max))) %>
          </p>

          <% if @assignment.group_min == 1 %>
            <p>
              <%= link_to I18n.t("student.work_alone"),
                {:action => 'creategroup', :id => @assignment.id, :workalone => 'true'}%>
            </p>
          <% end %>
          <p>
          <% if @student.has_pending_groupings_for?(@assignment.id)%>
            <%= link_to(I18n.t(:create),{:action => 'creategroup',
               :id => @assignment.id},{:confirm =>
               I18n.t("student.decline_invitation2")})
            %>
          <% else %>
{'fraction_non_alphanumeric': 0.1815576706580698, 'fraction_numerical': 0.01289530242554498, 'mean_word_length': 2.029138251704898, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 273, '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': '6432156', 'n_tokens_mistral': 3439, 'n_tokens_neox': 3155, 'n_words': 537}