<!-- 匿评作品列表，显示某一个作品的信息 -->
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
  <% is_my_work = student_work.user == User.current%>
  <li class="hworkList340 width525">
    <ul>
      <% if is_my_work%>
          <li class="hworkPortrait mt15 mr10">
            <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
          </li>
          <li class="hworkName mt15 mr15 width285">
            <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
            <div>
              <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
            </div>
          </li>
          <li>
            <ul class="mt10 fl">
              <li class="hworkStName mr10 mt16" title="姓名">
                <%= student_work.user.show_name%>
              </li>
              <li class="hworkStID mt16" title="学号">
                <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
              </li>
            </ul>
          </li>
      <% else%>
          <li class="hworkPortrait mt15 mr10">
            <%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
          </li>
          <li class="hworkName mt15 mr15 width285">
            <div>
              <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
            </div>
          </li>
          <li>
            <ul class="mt10 fl">
              <li class="hworkStName mr10 mt16" title="姓名">
                匿名
              </li>
              <li class="hworkStID mt16" title="学号">
                --
              </li>
            </ul>
          </li>
      <% end%>

    </ul>
  </li>
  <li class="hworkList130 c_grey">
    <%= 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(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
        <span class="c_red">[迟交]</span>
    <% end %>
  </li>

  <!-- 成绩 -->
  <% my_score = student_work_score(student_work,User.current) %>
  <li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10">
    <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
  </li>
</ul>

