<tr class="hworkListRow" id="student_work_<%= student_work.id %>">
  <td class="none"><a name="<%= student_work.id %>"></a></td>
  <td class="hworkList40 pl5 pr5" id="work_num_<%= student_work.id %>"><%= index + 1 %></td>
  <td class="hworkPortrait pr10 float-none">
    <%= link_to(image_tag(url_to_avatar(student_work.user), :width => "40", :height => "40", :style => "display:block;"), user_activities_path(student_work.user)) %>
  </td>
  <td class="<%= @homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStName100' %> pr10 float-none student_work_<%= student_work.id %>" title="<%= student_work.user.show_name %>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
    <%= student_work.user.show_name %>
  </td>
  <td class="<%= @homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStID90' %> pr10 float-none student_work_<%= student_work.id %>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
    <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
  </td>
  <td class="hworkList130 c_grey student_work_<%= student_work.id %>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
    <% if student_work.created_at && @homework.end_time %>
        <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M") %>&nbsp;
        <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
            <span class="c_red">[迟交]</span>
        <% end %>
    <% end %>
  </td>
  <td class="hworkList70 <%= score_color student_work.teacher_score %>">
    <%= student_work.teacher_score.nil? ? "--" : format("%.1f", student_work.teacher_score) %>
  </td>
  <td class="hworkList70 <%= score_color student_work.teaching_asistant_score %>">
    <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f", student_work.teaching_asistant_score) %>
  </td>
  <% if @homework.anonymous_comment == 0 %>
      <td class="hworkList70 <%= score_color student_work.student_score %> student_score_info">
        <% if student_work.student_score.nil? %>
            <span title="该作品未被匿评">未参与</span>
        <% else %>
            <%= format("%.1f", student_work.student_score) %>
        <% end %>
        <% unless student_work.student_score.nil? %>
        <span class="linkBlue">
          (<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>)
        </span>

            <div class="infoNi none">
              现共有
              <span class="c_red">&nbsp;<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>&nbsp;</span>
              名学生进行了匿评，平均分为
              <span class="c_red">&nbsp;<%= format("%.1f", student_work.student_score) %>&nbsp;</span>分。
            </div>
        <% end %>
      </td>
  <% end %>
  <!-- 成绩 -->
  <% if student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score %>
      <% score = student_work.respond_to?("score") ? student_work.score : student_work.teacher_score %>
  <% else %>
      <% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty %>
  <% end %>
  <td class="hworkList70 <%= score_color score %> student_final_scor_info">
    <%= score.nil? ? "--" : format("%.1f", score<0 ? 0 : score) %>
    <% unless score.nil? %>
        <div class="infoNi none width180">
          作品最终评分为
          <span class="c_red">&nbsp;<%= student_work.final_score %>&nbsp;</span>分。
          迟交扣分
          <span class="c_red">&nbsp;
            <%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.late_penalty %>
            &nbsp;</span>分，
          缺评扣分
          <span class="c_red">&nbsp;
            <%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.absence_penalty %>
            &nbsp;</span>分，
          最终成绩为
          <span class="c_red">&nbsp;<%= format("%.1f", score<0 ? 0 : score) %>&nbsp;</span>分。
        </div>
    <% end %>
  </td>
  <td>
    <div style="position:relative;">
      <div class="hworkTip" style="display: none" id="work_click_<%= student_work.id %>">
        <em></em><span></span><font class="fontGrey2">点击查看详情</font></div>
    </div>
  </td>
</tr>