anchor.diff:            );
   
             var teamAssignmentCheckbox = jQuery('#team_assignment')
  -          insertTeamBasedElements(teamAssignmentCheckbox.is(':checked'))
  +          insertTeamBasedElements()
   
             var bookmark_checkbox = jQuery('#assignment_form_assignment_use_bookmark');
             if (bookmark_checkbox.is(':checked')) {
  
positive.code:   <script>
        jQuery(document).ready(function () {
            // Adding an event listener to the team assignment checkbox.
            jQuery('#team_assignment').change(function() {
                insertTeamBasedElements(this.checked)
            });
  
            <% if @assignment_form.assignment.vary_by_round %>
  
negative.code:         }
      }
  
      function insertTeamBasedElements() {
          var varyByDutyDiv = jQuery('#vary_by_duty');
          varyByDutyDiv.removeAttr('hidden');
          var varyByDutyCheckbox = jQuery('#vary_by_duty_checkbox');
          if (varyByDutyCheckbox.is(':checked')) {
              addDutyBasedQuestionnaires();
          } else {
              addDefaultTeammateReviewQuestionnaire();
          }
      }
  </script>
  