<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
  <% if @homework.homework_type != 3 %>
      <% is_my_work = student_work.user == User.current%>
  <% else %>
      <% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %>
      <% is_my_work = pro && pro.student_work_id == student_work.id%>
  <% end %>

  <% if is_my_work%>
      <li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
      <li class="hworkPortrait mt15 mr10">
        <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40", style: "display:block;") %>
      </li>
      <li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
        <div>
          <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
          <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
        </div>
      </li>
      <div class="student_work_<%= student_work.id%>">
        <% if @homework.homework_type != 3 %>
            <li class="hworkStName w80" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
              <%= student_work.user.show_name%>
            </li>
            <li class="hworkStID" 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%>
            </li>
        <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
            <% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
                <li  class="hworkPrName mr10 mt12" title="项目名称">
                  <%= link_to( student_work.project.name, project_path(student_work.project.id))%>
                </li>
            <% else %>
                <li class="hworkPrName mr10 mt12" title="该项目是私有的">
                  <%= student_work.project.name %>
                </li>
            <% end %>
        <% end %>
      </div>
  <% else%>
      <li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
      <li class="hworkPortrait mt15 mr10">
        <%= image_tag(url_to_avatar(""),width:"40", height: "40", style: "display:block;") %>
      </li>
      <li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
        <div>
          <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
        </div>
      </li>
      <% if @homework.homework_type != 3 %>
          <li class="hworkStName w80" title="姓名" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
            匿名
          </li>
          <li class="hworkStID" title="学号">
            --
          </li>
      <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
          <li class="hworkPrName mr10" title="项目名称" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
            匿名
          </li>
      <% end %>
  <% end%>

  <li class="hworkList130 pl10 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
    <%= 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 %>
  </li>

  <!-- 成绩 -->
  <% if @homework.homework_type == 2%>
      <!-- 系统评分 -->
      <li class="hworkList50 <%= score_color student_work.system_score%>">
        <%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
      </li>
  <% end%>

  <% my_score = student_work_score(student_work,User.current) %>
  <li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10">
    <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
  </li>
  <li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
</ul>