<commit_before><script>
function requireSignUpChanged() {
  var msg = 'Warning! Unchecking this box will remove all topics and the reservations of everyone who is sign up for them';

  if (jQuery('#assignment_require_signup').is(':checked')) {
    addDueDateTableElement('signup', 0, <%= due_date(@assignment_form.assignment, 'signup').to_json.html_safe %>);
    addDueDateTableElement('drop_topic', 0, <%= due_date(@assignment_form.assignment, 'drop_topic').to_json.html_safe %>)
  } else {
    if (confirm(msg)) {
      removeDueDateTableElement('signup', 0);
      removeDueDateTableElement('drop_topic', 0);
    } else {
      jQuery('#assignment_require_signup').prop('checked', true);
    }
  }
}

function teamAssignmentChanged() {
  var msg = 'Warning! Unchecking this box will hide teams that already exist.'

  if (jQuery('#assignment_team_assignment').is(':checked')) {
    jQuery('#assignment_team_count_field').removeAttr('hidden');
    addDueDateTableElement('team_formation', 0, <%= due_date(@assignment_form.assignment, 'team_formation').to_json.html_safe %>)
  } else {
    if (confirm(msg)) {
      jQuery('#assignment_team_count_field').attr('hidden', true);
      removeDueDateTableElement('team_formation', 0);
    } else {
      jQuery('#assignment_team_assignment').prop('checked', true);
    }
  }
}

function microtaskChanged() {
  if (jQuery('#assignment_microtask').is(':checked')) {

  } else {

  }
}

function is_coding_assignmentChanged(){
  if (jQuery('#assignment_is_coding_assignment').is(':checked')) {

  } else {

  }
}

</script>

<table id='assignment_general_info_table'>
<tr class='heading'>
<th width=30%></th>
<th width=70%></th>
</tr>

<%= hidden_field_tag('assignment_form[assignment][instructor_id]', @assignment_form.assignment.instructor_id) %>
<%= hidden_field_tag('assignment_form[assignment][course_id]', @assignment_form.assignment.course_id) %>
<%= hidden_field_tag('assignment_form[assignment][id]', @assignment_form.assignment.id) %>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][name]', 'Assignment name:') %></td>
<td style='padding:5px'><%= text_field_tag('assignment_form[assignment][name]', @assignment_form.assignment.name, :style => 'width:250px') %></td>
</tr>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][course_id]', 'Course:') %></td>
<td style='padding:5px'><%= select('assignment_form[assignment]', 'course_id', course_options(@assignment_form.assignment.instructor), :selected => @assignment_form.assignment.course_id) %></td>
</tr>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %></td>
<td style='padding:5px'><%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, :style => 'width:250px') %></td>
</tr>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][spec_location]', 'Description URL: ') %></td>
<td style='padding:5px'><%= text_field_tag('assignment_form[assignment][spec_location]', @assignment_form.assignment.spec_location, :style => 'width:250px') %></td>
</tr>
</table>

<br/>
<hr/>

<table id='assignment_general_setting_table'>
<tr class='heading'>
<th width=40%></th>
<th width=60%></th>
  </tr>

  

  <% if @assignment_form.assignment.require_signup? %>
    <script>
      jQuery(document).ready(function () {
        addDueDateTableElement('signup', 0, <%= due_date(@assignment_form.assignment, 'signup').to_json.html_safe %>);
              addDueDateTableElement('drop_topic', 0, <%= due_date(@assignment_form.assignment, 'drop_topic').to_json.html_safe %>)
      });
    </script>
  <% end %>

  <tr>
    <td style='padding:5px' id='assignment_team_assignment_field'>
      <% if(@assignment_form.assignment.max_team_size == 1)%>
        <%= check_box_tag('team_assignment', 'true', false, {:onChange => 'hasTeamsChanged()'}) %>
      <% else %>
        <%= check_box_tag('team_assignment', 'true', @assignment_form.assignment.team_assignment?, {:onChange => 'hasTeamsChanged()'}) %>
      <% end %>
      <% @assignment_form.assignment.max_team_size %>
      <%= label_tag('team_assignment', 'Has teams?') %>
    </td>

    <td style='padding:5px' id='assignment_team_count_field' <%= 'hidden' if @assignment_form.assignment.max_team_size == 1%>>
      <%= label_tag('assignment_form[assignment][max_team_size]', 'Maximum number of members per team:') %>
      <%= text_field_tag('assignment_form[assignment][max_team_size]', @assignment_form.assignment.max_team_size, {:style => 'width:20px'}) %><br/>
    </td>
  </tr>

  <!--Quiz fields-->
  <tr>
    <td style='padding:5px' id='assignment_require_quiz_field'>
      <input name="assignment_form[assignment][require_quiz]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][require_quiz]', 'true', @assignment_form.assignment.require_quiz, {:onChange => 'hasQuizChanged()'}) %>
      <%= label_tag('assignment_form[assignment][require_quiz]', 'Has quiz?') %>
    </td>

    <td style='padding:5px' id='assignment_numbers_of_quiz_field' <%= 'hidden' unless @assignment_form.assignment.require_quiz %>>
      <%= label_tag('assignment_form[assignment][num_quiz_questions]', 'Number of Quiz questions:') %>
      <%= text_field_tag('assignment_form[assignment][num_quiz_questions]', @assignment_form.assignment.num_quiz_questions, { :style => 'width:20px'}) %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_wiki_assignment_field'>
      <%= check_box_tag('assignment_wiki_assignment', 'true', (@assignment_form.assignment.wiki_type.name != 'No'), :onChange => 'wikiAssignmentChanged()') %>
      <%= label_tag('assignment_wiki_assignment', 'Wiki assignment?') %>
    </td>

    <td style='padding:5px' id='assignment_wiki_type_field' <%= 'hidden' unless @assignment_form.assignment.wiki_type.name != 'No' %>>
      <%= label_tag('assignment_form[assignment][wiki_type_id]', 'Wiki type:') %>
      <%= select('assignment_form[assignment]', 'wiki_type_id', wiki_type_options, :selected => @assignment_form.assignment.wiki_type_id) %>
    </td>
  </tr>
  <!--staggered_deadlin-->
  <tr>
    <td style='padding:5px' id='assignment_staggered_deadline_field'>
      <input name="assignment_form[assignment][staggered_deadline]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][staggered_deadline]', 'true', @assignment_form.assignment.staggered_deadline, {:onChange => 'staggeredDeadlineChanged()'}) %>
      <%= label_tag('assignment_form[assignment][staggered_deadline]', 'Staggered deadline assignment?') %>
    </td>
    <td style='padding:5px' id='assignment_days_between_submissions_field' <%= 'hidden' unless @assignment_form.assignment.staggered_deadline %>>
      <%= label_tag('assignment_form[assignment][days_between_submissions]', 'Days between chapters:') %>
      <%= text_field_tag('assignment_form[assignment][days_between_submissions]', @assignment_form.assignment.days_between_submissions, {:onChange => 'daysBetweenSubmissionsChanged()', :style => 'width:20px'}) %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_microtask_field'>
      <input name="assignment_form[assignment][microtask]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][microtask]', 'true', @assignment_form.assignment.microtask, {:onchange => 'microtaskChanged()'}) %>
      <%= label_tag('assignment_form[assignment][microtask]', 'Micro-task assignment?') %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_review_visible_to_all_field'>
      <input name="assignment_form[assignment][reviews_visible_to_all]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][reviews_visible_to_all]', 'true', @assignment_form.assignment.reviews_visible_to_all) %>
      <%= label_tag('assignment_form[assignment][reviews_visible_to_all]', 'Reviews visible to all other reviewers?') %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_allow_suggestion_field'>
      <input name="assignment_form[assignment][allow_suggestions]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][allow_suggestions]', 'true', @assignment_form.assignment.allow_suggestions) %>
      <%= label_tag('assignment_form[assignment][allow_suggestions]', 'Allow topic suggestions from students?') %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_is_coding_assignment_field'>
      <input name="assignment_form[assignment][is_coding_assignment]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][is_coding_assignment]', 'true', @assignment_form.assignment.is_coding_assignment, {:onchange => 'is_coding_assignmentChanged()'}) %>
      <%= label_tag('assignment_form[assignment][is_coding_assignment]', 'Is code submission required?') %>
    </td>

  </tr>

  <!--Teammate reviews fields-->
  <tr>
    <td style='padding:5px' id='assignment_show_teammate_reviews'>
      <input name="assignment_form[assignment][show_teammate_reviews]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][show_teammate_reviews]', 'true', @assignment_form.assignment.show_teammate_reviews) %>
      <%= label_tag('assignment_form[assignment][show_teammate_reviews]', 'Show teammate reviews?') %>
    </td>
   </tr>

  <!--"available to student?" should be the last checkbox-->
  <tr>
    <td style='padding:5px' id='assignment_availability_flag_field'>
      <input name="assignment_form[assignment][availability_flag]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][availability_flag]', 'true', @assignment_form.assignment.availability_flag) %>
      <%= label_tag('assignment_form[assignment][availability_flag]', 'Available to students?') %>
    </td>
  </tr><commit_msg>'Show teammate reviews?' should appear only if instructor click 'Has team', and 'Show teammate reviews?' should put behind 'Maximum number of members per team' and in the same line.<commit_after><script>
function requireSignUpChanged() {
  var msg = 'Warning! Unchecking this box will remove all topics and the reservations of everyone who is sign up for them';

  if (jQuery('#assignment_require_signup').is(':checked')) {
    addDueDateTableElement('signup', 0, <%= due_date(@assignment_form.assignment, 'signup').to_json.html_safe %>);
    addDueDateTableElement('drop_topic', 0, <%= due_date(@assignment_form.assignment, 'drop_topic').to_json.html_safe %>)
  } else {
    if (confirm(msg)) {
      removeDueDateTableElement('signup', 0);
      removeDueDateTableElement('drop_topic', 0);
    } else {
      jQuery('#assignment_require_signup').prop('checked', true);
    }
  }
}

function teamAssignmentChanged() {
  var msg = 'Warning! Unchecking this box will hide teams that already exist.'

  if (jQuery('#assignment_team_assignment').is(':checked')) {
    jQuery('#assignment_team_count_field').removeAttr('hidden');
    addDueDateTableElement('team_formation', 0, <%= due_date(@assignment_form.assignment, 'team_formation').to_json.html_safe %>)
  } else {
    if (confirm(msg)) {
      jQuery('#assignment_team_count_field').attr('hidden', true);
      removeDueDateTableElement('team_formation', 0);
    } else {
      jQuery('#assignment_team_assignment').prop('checked', true);
    }
  }
}

function microtaskChanged() {
  if (jQuery('#assignment_microtask').is(':checked')) {

  } else {

  }
}

function is_coding_assignmentChanged(){
  if (jQuery('#assignment_is_coding_assignment').is(':checked')) {

  } else {

  }
}

</script>

<table id='assignment_general_info_table'>
<tr class='heading'>
<th width=30%></th>
<th width=70%></th>
</tr>

<%= hidden_field_tag('assignment_form[assignment][instructor_id]', @assignment_form.assignment.instructor_id) %>
<%= hidden_field_tag('assignment_form[assignment][course_id]', @assignment_form.assignment.course_id) %>
<%= hidden_field_tag('assignment_form[assignment][id]', @assignment_form.assignment.id) %>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][name]', 'Assignment name:') %></td>
<td style='padding:5px'><%= text_field_tag('assignment_form[assignment][name]', @assignment_form.assignment.name, :style => 'width:250px') %></td>
</tr>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][course_id]', 'Course:') %></td>
<td style='padding:5px'><%= select('assignment_form[assignment]', 'course_id', course_options(@assignment_form.assignment.instructor), :selected => @assignment_form.assignment.course_id) %></td>
</tr>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %></td>
<td style='padding:5px'><%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, :style => 'width:250px') %></td>
</tr>

<tr>
<td style='padding:5px'><%= label_tag('assignment_form[assignment][spec_location]', 'Description URL: ') %></td>
<td style='padding:5px'><%= text_field_tag('assignment_form[assignment][spec_location]', @assignment_form.assignment.spec_location, :style => 'width:250px') %></td>
</tr>
</table>

<br/>
<hr/>

<table id='assignment_general_setting_table'>
<tr class='heading'>
<th width=40%></th>
<th width=60%></th>
  </tr>

  <% if @assignment_form.assignment.require_signup? %>
    <script>
      jQuery(document).ready(function () {
        addDueDateTableElement('signup', 0, <%= due_date(@assignment_form.assignment, 'signup').to_json.html_safe %>);
              addDueDateTableElement('drop_topic', 0, <%= due_date(@assignment_form.assignment, 'drop_topic').to_json.html_safe %>)
      });
    </script>
  <% end %>

  <tr>
    <td style='padding:5px' id='assignment_team_assignment_field'>
      <% if(@assignment_form.assignment.max_team_size == 1)%>
        <%= check_box_tag('team_assignment', 'true', false, {:onChange => 'hasTeamsChanged()'}) %>
      <% else %>
        <%= check_box_tag('team_assignment', 'true', @assignment_form.assignment.team_assignment?, {:onChange => 'hasTeamsChanged()'}) %>
      <% end %>
      <% @assignment_form.assignment.max_team_size %>
      <%= label_tag('team_assignment', 'Has teams?') %>
    </td>

    <td style='padding:5px' id='assignment_team_count_field' <%= 'hidden' if @assignment_form.assignment.max_team_size == 1%>>
      <!--Teammate reviews fields-->
      <input name="assignment_form[assignment][show_teammate_reviews]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][show_teammate_reviews]', 'true', @assignment_form.assignment.show_teammate_reviews) %>
      <%= label_tag('assignment_form[assignment][show_teammate_reviews]', 'Show teammate reviews?') %>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <!--Maximum number of members per team-->
      <%= label_tag('assignment_form[assignment][max_team_size]', 'Maximum number of members per team:') %>
      <%= text_field_tag('assignment_form[assignment][max_team_size]', @assignment_form.assignment.max_team_size, {:style => 'width:20px'}) %>
    </td>
  </tr>

  <!--Quiz fields-->
  <tr>
    <td style='padding:5px' id='assignment_require_quiz_field'>
      <input name="assignment_form[assignment][require_quiz]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][require_quiz]', 'true', @assignment_form.assignment.require_quiz, {:onChange => 'hasQuizChanged()'}) %>
      <%= label_tag('assignment_form[assignment][require_quiz]', 'Has quiz?') %>
    </td>

    <td style='padding:5px' id='assignment_numbers_of_quiz_field' <%= 'hidden' unless @assignment_form.assignment.require_quiz %>>
      <%= label_tag('assignment_form[assignment][num_quiz_questions]', 'Number of Quiz questions:') %>
      <%= text_field_tag('assignment_form[assignment][num_quiz_questions]', @assignment_form.assignment.num_quiz_questions, { :style => 'width:20px'}) %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_wiki_assignment_field'>
      <%= check_box_tag('assignment_wiki_assignment', 'true', (@assignment_form.assignment.wiki_type.name != 'No'), :onChange => 'wikiAssignmentChanged()') %>
      <%= label_tag('assignment_wiki_assignment', 'Wiki assignment?') %>
    </td>

    <td style='padding:5px' id='assignment_wiki_type_field' <%= 'hidden' unless @assignment_form.assignment.wiki_type.name != 'No' %>>
      <%= label_tag('assignment_form[assignment][wiki_type_id]', 'Wiki type:') %>
      <%= select('assignment_form[assignment]', 'wiki_type_id', wiki_type_options, :selected => @assignment_form.assignment.wiki_type_id) %>
    </td>
  </tr>
  <!--staggered_deadlin-->
  <tr>
    <td style='padding:5px' id='assignment_staggered_deadline_field'>
      <input name="assignment_form[assignment][staggered_deadline]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][staggered_deadline]', 'true', @assignment_form.assignment.staggered_deadline, {:onChange => 'staggeredDeadlineChanged()'}) %>
      <%= label_tag('assignment_form[assignment][staggered_deadline]', 'Staggered deadline assignment?') %>
    </td>
    <td style='padding:5px' id='assignment_days_between_submissions_field' <%= 'hidden' unless @assignment_form.assignment.staggered_deadline %>>
      <%= label_tag('assignment_form[assignment][days_between_submissions]', 'Days between chapters:') %>
      <%= text_field_tag('assignment_form[assignment][days_between_submissions]', @assignment_form.assignment.days_between_submissions, {:onChange => 'daysBetweenSubmissionsChanged()', :style => 'width:20px'}) %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_microtask_field'>
      <input name="assignment_form[assignment][microtask]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][microtask]', 'true', @assignment_form.assignment.microtask, {:onchange => 'microtaskChanged()'}) %>
      <%= label_tag('assignment_form[assignment][microtask]', 'Micro-task assignment?') %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_review_visible_to_all_field'>
      <input name="assignment_form[assignment][reviews_visible_to_all]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][reviews_visible_to_all]', 'true', @assignment_form.assignment.reviews_visible_to_all) %>
      <%= label_tag('assignment_form[assignment][reviews_visible_to_all]', 'Reviews visible to all other reviewers?') %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_allow_suggestion_field'>
      <input name="assignment_form[assignment][allow_suggestions]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][allow_suggestions]', 'true', @assignment_form.assignment.allow_suggestions) %>
      <%= label_tag('assignment_form[assignment][allow_suggestions]', 'Allow topic suggestions from students?') %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='assignment_is_coding_assignment_field'>
      <input name="assignment_form[assignment][is_coding_assignment]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][is_coding_assignment]', 'true', @assignment_form.assignment.is_coding_assignment, {:onchange => 'is_coding_assignmentChanged()'}) %>
      <%= label_tag('assignment_form[assignment][is_coding_assignment]', 'Is code submission required?') %>
    </td>

  </tr>

  <!--"available to student?" should be the last checkbox-->
  <tr>
    <td style='padding:5px' id='assignment_availability_flag_field'>
      <input name="assignment_form[assignment][availability_flag]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][availability_flag]', 'true', @assignment_form.assignment.availability_flag) %>
      <%= label_tag('assignment_form[assignment][availability_flag]', 'Available to students?') %>
    </td>
  </tr>
{'fraction_non_alphanumeric': 0.17641462193289936, 'fraction_numerical': 0.005458187280921382, 'mean_word_length': 6.251633986928105, 'pattern_counts': {'":': 0, '<': 321, '<?xml version=': 0, '>': 353, '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': '3621100', 'n_tokens_mistral': 7096, 'n_tokens_neox': 6664, 'n_words': 941}