anchor.diff:        </tr>
   
         <% responses.each do |response_id| %>
  -          <% team = Team.find(ResponseMap.find(Response.find(response_id).map_id).reviewee_id) %>
  -          <tr>
  -            <td> <%= team.name %> </td>
  -            <td colspan="2"> <%=sanitize Response.find(response_id).additional_comment %> </td>
  -          </tr>
  +        <% team = Team.find(ResponseMap.find(Response.find(response_id).map_id).reviewee_id) %>
  +        <tr>
  +          <td> <%= team.name %> </td>
  +          <td colspan="2"> <%=sanitize Response.find(response_id).additional_comment %> </td>
  +        </tr>
         <% end %>
       </table>
   
  -<% end #loop for keys %>
  -<br/>+  <% end #loop for keys %>
  +  <br/>
  +
  +<% end %>
positive.code:       <% responses = @review_final_versions[key][:response_ids] %>
        <% questions.each do |question| %>
  
            <% if !question.is_a?(QuestionnaireHeader) && num_responses > 0 %>
                <tr>
                  <th colspan="3" style="background-color:#DDDDBB" > [Question] <%= question.txt %> </th>
                </tr>
                <% if question.instance_of? Checkbox %>
                    <tr>
                      <td colspan="3" style="padding: 0px;">
                        <table width="100%">
                          <tr>
                            <% responses.each do |response_id| %>
                                <% team = Team.find(ResponseMap.find(Response.find(response_id).map_id).reviewee_id) %>
                                <td><%= team.name %></td>
                            <% end %>
                          </tr>
  
                          <tr>
                            <% responses.each do |response_id| %>
                                <% answer = Answer.where(response_id: response_id, question_id: question.id).first %>
                                <td align='center'>
                                  <p><%= answer.answer == 0 ? image_tag("delete_icon.png") : image_tag("Check-icon.png") %></p></td>
                            <% end %>
                          </tr>
                        </table>
                      </td>
                    </tr>
                <% else %>
                    <!-- Only assign these column headers if the question isn't a checkbox question -->
                    <tr>
                      <td width="20%"> Reviewee</td>
                      <td width="10%"> Score</td>
                      <td width="70%"> Comments</td>
                    </tr>
  
                    <% responses.each do |response_id| %>
                        <% answer = Answer.where(response_id: response_id, question_id: question.id).first %>
                        <% if !answer.nil? %>
                            <tr>
                              <% team = Team.find(ResponseMap.find(Response.find(response_id).map_id).reviewee_id) %>
                              <% response_map = ReviewResponseMap.where(reviewed_object_id: @assignment_id,
                                                                        reviewer_id: @reviewer_id,
                                                                        reviewee_id: team.id).last %>
                              <% response_update_at = response_map.try(:response).try(:last).try(:updated_at) %>
                              <% review_graded_at = ReviewGrade.find_by(participant_id: @reviewer_id).try(:review_graded_at) %>
                              <% col_color = 'black' %>
                              <% col_color = 'blue' if review_graded_at && response_update_at && response_update_at > review_graded_at %>
                              <!--Reviewee-->
                              <td>
                                <p style="color: <%= col_color %>"><%= team.name %> <br>
                              </td>
                              <!--Score-->
                              <% if question.instance_of? Checkbox %>
                                  <td align='center'>
                                    <p style="color: <%= col_color %>"><%= answer.answer == 0 ? image_tag("delete_icon.png") : image_tag("Check-icon.png") %></p>
                                  </td>
                              <% else %>
                                  <td align='center'><p style="color: <%= col_color %>"><%= answer.answer %></p></td>
                              <% end %>
  
                              <!--Comments-->
                              <td align='left'><p style="color: <%= col_color %>"><%= answer.comments.html_safe unless answer.comments.nil? %></p></td>
                            </tr>
                        <% else %>
                            <td>N/A</td>
                            <td>N/A</td>
                            <td>N/A</td>
                        <% end %>
                    <% end %>
                <% end %>
            <% else %>
                <% next %>
            <% end %>
        <% end %>
        <tr>
          <th align='left' style="background-color:#DDDDBB"> Reviewee</th>
  
negative.code: <!--As instructed by Zhewei Hu and Dr. Gehringer, if the current assignment varies by topic,-->
  <!--this view should not display the content below. Instead it should display a message-->
  <!--saying that this report is not available for assignments where rubrics vary by topic-->
  <!--This message is set as the flash message from popup_controller.rb-->
  <% assignment = Assignment.find(@assignment_id) %>
  <% if !assignment.varying_rubrics_by_topic? %>
  
    <h2> Review scores: <%= Participant.find(@reviewer_id).name %> </h2>
  
    <% keys = @review_final_versions.keys %>
    <% keys.each do |key| %>
  
      <h4>Course: <%= Assignment.find(@assignment_id).course.name %></h4>
      <h4> Assignment: <%= Assignment.find(@assignment_id).name %></h4>
  