<%= link_to "所有作品(#{@stundet_works.count})".html_safe,student_work_index_path(:homework => @homework.id), :class => "fl"%> <% if @show_all%> 搜索 <% end%> <% if @is_teacher%>
<% if @homework.student_works.empty?%> <%= link_to "附件", "javascript:void(0)", class: "down_btn fr", :onclick => "alert('没有学生提交作业,无法下载附件')" %> <% else%> <%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), remote: true, class: "down_btn fr", :id => "download_homework_attachments" %> <% end%> <%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%> 导出全部:
<% end%>
    <% if @is_evaluation.nil?%> <%= render :partial => 'student_work_title'%> <% else%> <%= render :partial => 'evaluation_work_title'%> <% end%>
<% @stundet_works.each do |student_work|%> <%= render :partial => (@is_evaluation ? 'evaluation_work' :'student_work'),:locals => {:student_work => student_work}%>
<% end%>
<%= link_to(image_tag(url_to_avatar(@homework.user), :width => "42", :height => "42"), user_path(@homework.user), :class => "problem_pic fl") %>

<%= @homework.name%>

<% if @is_teacher%> <%= homework_anonymous_comment(@homework)%> <%= link_to(l(:button_edit),edit_homework_common_path(@homework), :class => "fr mr10 work_edit") %> <% else%> <%= student_anonymous_comment @homework %> <%= student_new_homework @homework %> <% end %>
<%= @homework.description.html_safe %>
<% unless @homework.attachments.empty?%> 附件:
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
<% end%>
截止时间:<%= @homework.end_time%>
<% if betweentime(@homework.end_time) < 0 %> <%= l(:label_commit_limit)%> <% else %>
<% end %>