<commit_before><!--The reason why add an empty form_tag here. (https://github.com/expertiza/expertiza/commit/4d1a9d50833aca4e8771afd851daa40455d4fc37)-->
<%= form_tag controller: 'assignment', action: 'edit', assignment_id: @assignment_form.assignment.id do %>
<% end %>
<table>
  <tr id='assignment_review_assignment_strategy_row'>
    <td>
      <%= label_tag('assignment_form[assignment][review_assignment_strategy]', 'Review Strategy:') %>
      <%= select('assignment_form[assignment]', 'review_assignment_strategy', review_strategy_options, {:selected => @assignment_form.assignment.review_assignment_strategy}) %>
      <script>
        jQuery(document).ready(function() {reviewStrategyChanged();});
          jQuery('#assignment_form_assignment_review_assignment_strategy').on('change', function() {reviewStrategyChanged();});
      </script>

      <img src="/assets/info.png" title='- Instructor-Selected: Instructor decides who reviews whom
- Auto-Selected: When a student is about to begin a review, Expertiza assigns that student a particular review.'>
    </td>
  </tr>

  <tr id="assignment_review_topic_threshold_row">
    <td>
      <%= label_tag('assignment_form[assignment][review_topic_threshold]', 'Review topic threshold (k):') %>
      <%= text_field_tag('assignment_form[assignment][review_topic_threshold]', @assignment_form.assignment.review_topic_threshold, size: 1) %>
      <img src="/assets/info.png" title='A topic is reviewable if the minimum number of reviews already done for the submissions on that topic is within k of the minimum number of reviews done on the least-reviewed submission on any topic.'>
    <br/>
      <%= label_tag('assignment_form[assignment][max_reviews_per_submission]', 'Maximum number of reviews per submission:') %>
      <%= text_field_tag('assignment_form[assignment][max_reviews_per_submission]', @assignment_form.assignment.max_reviews_per_submission ||= 10, size: 1) %>
    <br/>
      <%= label_tag('assignment_form[assignment][num_reviews]', 'Set max number of reviews done by each student') %>
      <%= text_field_tag('assignment_form[assignment][num_reviews]', @assignment_form.assignment.num_reviews ||= 3, size: 1) %>
    </td>
  </tr>
  <tr id="instructor_selected_review_mapping_mechanism" hidden='hidden'>
    <td>
      <%= form_tag :controller => 'review_mapping', :action => 'automatic_review_mapping', :id => @assignment_form.assignment.id do %>
        <input name="max_team_size" type="hidden" value="<%= @assignment_form.assignment.max_team_size %>"/>
        <%= radio_button_tag 'num_reviews', 'student', true %>
        <%= label_tag('num_reviews_per_student', 'Set number of reviews done by each student') %>&nbsp;&nbsp;&nbsp;&nbsp;
        <span id='num_reviews_per_student_threshold'>
          <%= text_field_tag('num_reviews_per_student', 0, {:style => 'width:20px'}) %>
          <%= submit_tag 'Assign reviewers', :id => 'first_submit_tag' %>
        </span><br/>

        <%= radio_button_tag 'num_reviews', 'submission', false %>
        <%= label_tag('num_reviews_per_submission', 'Set minimum number of reviews done for each submission') %>&nbsp;&nbsp;&nbsp;&nbsp;
        <span id='num_reviews_per_submission_threshold' hidden='hidden'>
          <%= text_field_tag('num_reviews_per_submission', 0, {:style => 'width:20px'}) %>
          <%= submit_tag 'Assign reviewers', :id => 'second_submit_tag' %>
        </span><br/>

        <%= radio_button_tag 'num_reviews', 'calibrated_and_uncalibrated', false %>
        <%= label_tag('assign_both_calibrated_and_uncalibrated_artifacts', 'Set both calibrated and uncalibrated artifacts') %>&nbsp;&nbsp;&nbsp;&nbsp;
        <span id='calibrated_and_uncalibrated_artifacts_threshold' hidden='hidden'>
          <%= text_field_tag('num_calibrated_artifacts', 0, {:style => 'width:20px'}) %>
          <%= label_tag('num_calibrated_artifacts', 'of calibrated artifacts and ') %>&nbsp;&nbsp;&nbsp;&nbsp;
          <%= text_field_tag('num_uncalibrated_artifacts', 0, {:style => 'width:20px'}) %>
          <%= label_tag('num_uncalibrated_artifacts', 'of uncalibrated artifacts done by each student') %>&nbsp;&nbsp;&nbsp;&nbsp;
          <%= submit_tag 'Assign both calibrated and uncalibrated artifacts', :id => 'third_submit_tag' %>
        </span><br/>
      <% end %>
    </td>
  </tr>

  <!--#E1600-->
  <!-- self review flag should be the last checkbox in review strategy tab while editing/creating assignment-->
  <tr>
    <td style='padding:5px' id='assignment_is_selfreview_enabled'>
      <input name="assignment_form[assignment][is_selfreview_enabled]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %>
      <%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %>
    </td>
  </tr>

</table><commit_msg>Allow instructors to change anonymity setting.<commit_after><!--The reason why add an empty form_tag here. (https://github.com/expertiza/expertiza/commit/4d1a9d50833aca4e8771afd851daa40455d4fc37)-->
<%= form_tag controller: 'assignment', action: 'edit', assignment_id: @assignment_form.assignment.id do %>
<% end %>
<table>
  <tr id='assignment_review_assignment_strategy_row'>
    <td>
      <%= label_tag('assignment_form[assignment][review_assignment_strategy]', 'Review Strategy:') %>
      <%= select('assignment_form[assignment]', 'review_assignment_strategy', review_strategy_options, {:selected => @assignment_form.assignment.review_assignment_strategy}) %>
      <script>
        jQuery(document).ready(function() {reviewStrategyChanged();});
          jQuery('#assignment_form_assignment_review_assignment_strategy').on('change', function() {reviewStrategyChanged();});
      </script>

      <img src="/assets/info.png" title='- Instructor-Selected: Instructor decides who reviews whom
- Auto-Selected: When a student is about to begin a review, Expertiza assigns that student a particular review.'>
    </td>
  </tr>

  <tr id="assignment_review_topic_threshold_row">
    <td>
      <%= label_tag('assignment_form[assignment][review_topic_threshold]', 'Review topic threshold (k):') %>
      <%= text_field_tag('assignment_form[assignment][review_topic_threshold]', @assignment_form.assignment.review_topic_threshold, size: 1) %>
      <img src="/assets/info.png" title='A topic is reviewable if the minimum number of reviews already done for the submissions on that topic is within k of the minimum number of reviews done on the least-reviewed submission on any topic.'>
    <br/>
      <%= label_tag('assignment_form[assignment][max_reviews_per_submission]', 'Maximum number of reviews per submission:') %>
      <%= text_field_tag('assignment_form[assignment][max_reviews_per_submission]', @assignment_form.assignment.max_reviews_per_submission ||= 10, size: 1) %>
    <br/>
      <%= label_tag('assignment_form[assignment][num_reviews]', 'Set max number of reviews done by each student') %>
      <%= text_field_tag('assignment_form[assignment][num_reviews]', @assignment_form.assignment.num_reviews ||= 3, size: 1) %>
    </td>
  </tr>
  <tr id="instructor_selected_review_mapping_mechanism" hidden='hidden'>
    <td>
      <%= form_tag :controller => 'review_mapping', :action => 'automatic_review_mapping', :id => @assignment_form.assignment.id do %>
        <input name="max_team_size" type="hidden" value="<%= @assignment_form.assignment.max_team_size %>"/>
        <%= radio_button_tag 'num_reviews', 'student', true %>
        <%= label_tag('num_reviews_per_student', 'Set number of reviews done by each student') %>&nbsp;&nbsp;&nbsp;&nbsp;
        <span id='num_reviews_per_student_threshold'>
          <%= text_field_tag('num_reviews_per_student', 0, {:style => 'width:20px'}) %>
          <%= submit_tag 'Assign reviewers', :id => 'first_submit_tag' %>
        </span><br/>

        <%= radio_button_tag 'num_reviews', 'submission', false %>
        <%= label_tag('num_reviews_per_submission', 'Set minimum number of reviews done for each submission') %>&nbsp;&nbsp;&nbsp;&nbsp;
        <span id='num_reviews_per_submission_threshold' hidden='hidden'>
          <%= text_field_tag('num_reviews_per_submission', 0, {:style => 'width:20px'}) %>
          <%= submit_tag 'Assign reviewers', :id => 'second_submit_tag' %>
        </span><br/>

        <%= radio_button_tag 'num_reviews', 'calibrated_and_uncalibrated', false %>
        <%= label_tag('assign_both_calibrated_and_uncalibrated_artifacts', 'Set both calibrated and uncalibrated artifacts') %>&nbsp;&nbsp;&nbsp;&nbsp;
        <span id='calibrated_and_uncalibrated_artifacts_threshold' hidden='hidden'>
          <%= text_field_tag('num_calibrated_artifacts', 0, {:style => 'width:20px'}) %>
          <%= label_tag('num_calibrated_artifacts', 'of calibrated artifacts and ') %>&nbsp;&nbsp;&nbsp;&nbsp;
          <%= text_field_tag('num_uncalibrated_artifacts', 0, {:style => 'width:20px'}) %>
          <%= label_tag('num_uncalibrated_artifacts', 'of uncalibrated artifacts done by each student') %>&nbsp;&nbsp;&nbsp;&nbsp;
          <%= submit_tag 'Assign both calibrated and uncalibrated artifacts', :id => 'third_submit_tag' %>
        </span><br/>
      <% end %>
    </td>
  </tr>

  <tr>
    <td style='padding:5px' id='is_anonymous'>
      <input name="assignment_form[assignment][is_anonymous]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][is_anonymous]', 'true', @assignment_form.assignment.is_anonymous) %>
      <%= label_tag('assignment_form[assignment][is_anonymous]', 'Is Anonymous Review?') %>
    </td>
  </tr>

  <!--#E1600-->
  <!-- self review flag should be the last checkbox in review strategy tab while editing/creating assignment-->
  <tr>
    <td style='padding:5px' id='assignment_is_selfreview_enabled'>
      <input name="assignment_form[assignment][is_selfreview_enabled]" type="hidden" value="false"/>
      <%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %>
      <%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %>
    </td>
  </tr>

</table>
{'fraction_non_alphanumeric': 0.15161290322580645, 'fraction_numerical': 0.009286412512218964, 'mean_word_length': 4.990046838407494, 'pattern_counts': {'":': 0, '<': 146, '<?xml version=': 0, '>': 168, 'https://': 2, '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': '7584543', 'n_tokens_mistral': 3432, 'n_tokens_neox': 3167, 'n_words': 623}