<tr class="nested-fields <%= f.object.persisted? ? 'existing' : 'dynamic' %>" style="<%= 'display: none;' if f.object.marked_for_destruction? %>">
  <td>
    <% if f.object.persisted? %>
      <%= f.hidden_field :id %>
      <%= f.hidden_field :_destroy %>
    <% end %>

    <%= f.input :student_id, as: :hidden %>
    <span class="multiline"><%= f.object.student.to_s %></span>
  </td>

  <td>
    <span class="needed_score">
      <%= f.object.student.try(:needed_score) unless f.object.marked_for_destruction? %>
    </span>
  </td>

  <td>
    <%= f.input :score, label: false,
          input_html: decimal_input_mask(@number_of_decimal_places) %>
  </td>
</tr>
