<commit_before><style>

  #student_container {
    color: #444444;
    width: 250px;
    float: left;
  }

  #student_container ul {
    height: 500px;
    overflow: auto;
    list-style-type: none;
  }

  #groups_container {
    width: 350px;
    float: left;
    border: 1px solid #333;
    margin-right: 15px;
  }

  .groups {
    overflow: auto;
    height: 500px;
  }

  #groups_container .header {
    height: 60px;
    padding: 5px;
    background: #DDDDDD none repeat scroll 0 0;
  }

  #groups_container ul {
    list-style: none;
    padding: 0;
    color: #444444;
  }

  #groups_container ul li { margin: 5px; }

  #groups_container a {
    color: #AA0000; /* link for delete */
  }

  .remove_group { float: right; }

  .group {
    font-weight: bold;
    border: 1px solid #CCC;
    background-color: #FCF1C3;
    padding: 10px;
    width: 300px;
    margin: 5px;
  }

  .fail-no-img { width: 250px; font-size: 80%; }

</style>

<script type="text/javascript" language="JavaScript">
  function clearText(id) {
    $("member_name[" + id + "]").value = "";
  }
  function focusText(id) {
    $("member_name[" + id + "]").focus()
  }
</script>

<h1>Manage Groups for <%= @assignment.name %></h1>

<div id="upload">
   Upload a group list<br />
   <p>
      Select a CSV file form:<br />
      <code>user_name,user_name,user_name ... </code><br />
  </p>
	<p>
		<% form_for :upload, :html => {:multipart => true}, :url => { :controller=>"groups",
										:action => 'csv_upload',
										:id => @assignment.id,
										:html => {:multipart => true }} do |f| -%>
		<p>
	      <%= f.file_field :grouplist %>
		</p>
		<p>
			<%= submit_tag("Submit") %>
		</p>							
	   <% end %>
	</p>
</div>

<p><%= link_to_remote "Create a New Group", :method => 'post', 
  :url => { :action => 'add_group', :id => @assignment.id } %></p>

<div id="groups_container">
  <div class="header"><h2>Groups for <%= @assignment.name %></h2></div>

  <div class="groups" id="groups">
    <% @groups.each do |group| -%>
      <%= render :partial => "groups/manage/group", :locals => {:group => group} %>
    <% end -%>
  </div>

</div>

<% # order of processing students is important. we go through each member 
   # one by one and delete them above from the list of students 
   # if they are already in a group %>

<div id="student_container">
  <h3>Users not in group:</h3><commit_msg>Can upload group list now.<commit_after><style>

  #student_container {
    color: #444444;
    width: 250px;
    float: left;
  }

  #student_container ul {
    height: 500px;
    overflow: auto;
    list-style-type: none;
  }

  #groups_container {
    width: 350px;
    float: left;
    border: 1px solid #333;
    margin-right: 15px;
  }

  .groups {
    overflow: auto;
    height: 500px;
  }

  #groups_container .header {
    height: 60px;
    padding: 5px;
    background: #DDDDDD none repeat scroll 0 0;
  }

  #groups_container ul {
    list-style: none;
    padding: 0;
    color: #444444;
  }

  #groups_container ul li { margin: 5px; }

  #groups_container a {
    color: #AA0000; /* link for delete */
  }

  .remove_group { float: right; }

  .group {
    font-weight: bold;
    border: 1px solid #CCC;
    background-color: #FCF1C3;
    padding: 10px;
    width: 300px;
    margin: 5px;
  }

  .fail-no-img { width: 250px; font-size: 80%; }

</style>

<script type="text/javascript" language="JavaScript">
  function clearText(id) {
    $("member_name[" + id + "]").value = "";
  }
  function focusText(id) {
    $("member_name[" + id + "]").focus()
  }
</script>

<h1>Manage Groups for <%= @assignment.name %></h1>

<div id="upload">
   Upload a group list<br />
   <p>
      Select a CSV file form:<br />
      <code>user_name,user_name,user_name ... </code><br />
  </p>
	<p>
		<% form_for :group, :html => {:multipart => true},
												:url => { :controller=>"groups",
												:action => 'csv_upload',
												:id => @assignment.id} do |f| -%>
		<p>
	      <%= f.file_field :grouplist %>
		</p>
		<p>
			<%= submit_tag("Submit") %>
		</p>							
	   <% end %>
	</p>
</div>

<p><%= link_to_remote "Create a New Group", :method => 'post', 
  :url => { :action => 'add_group', :id => @assignment.id } %></p>

<div id="groups_container">
  <div class="header"><h2>Groups for <%= @assignment.name %></h2></div>

  <div class="groups" id="groups">
    <% @groups.each do |group| -%>
      <%= render :partial => "groups/manage/group", :locals => {:group => group} %>
    <% end -%>
  </div>

</div>

<% # order of processing students is important. we go through each member 
   # one by one and delete them above from the list of students 
   # if they are already in a group %>

<div id="student_container">
  <h3>Users not in group:</h3>
{'fraction_non_alphanumeric': 0.178752107925801, 'fraction_numerical': 0.025716694772344013, 'mean_word_length': 2.684006211180124, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 121, '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': '3861976', 'n_tokens_mistral': 1976, 'n_tokens_neox': 1715, 'n_words': 444}