<%= link_to "所有作品(#{@stundet_works.count})".html_safe,student_work_index_path(:homework => @homework.id), :class => "fl"%> <% if @show_all%> <%= select_tag(:late_penalty,options_for_select(course_group_list(@course),@group), {:class => "fl h22 w100 ml10"}) if(@is_teacher && course_group_list(@course).count > 0) %> 搜索 <%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %> <% end%> <% if @is_teacher%>
<% unless @homework.homework_type == 2%> <% if @homework.student_works.empty?%> <%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %> <% else%> <%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %> <% end%>
使用 winzip 工具进行解压可能会导致 下载文件乱码 ,建议您使用 winrar 工具进行解压
<% end%> <%= link_to("匿评", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> <%= link_to("缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> <%= 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%>
    <%= render :partial => 'evaluation_work_title'%>
<% @stundet_works.each do |student_work|%> <%= render :partial => "evaluation_work",:locals => {:student_work => student_work}%>
<% end%> <% else %> <% if @homework.homework_type == 1 || @homework.homework_type == 2%>
    <%= render :partial => 'evaluation_student_work_title'%>
<% @stundet_works.each do |student_work|%> <%= render :partial => "evaluation_student_work",:locals => {:student_work => student_work}%>
<% end%> <% else%>
    <%= render :partial => 'student_work_title'%>
<% @stundet_works.each do |student_work|%> <%= render :partial => "student_work",:locals => {:student_work => student_work}%>
<% end%> <% end%> <% 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)%> <% else%> <%= student_anonymous_comment @homework %> <%= student_new_homework @homework %> <% end %>
<%= @homework.description.html_safe %>
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%> <% if @is_teacher%> "> <% @homework.homework_tests.each do |test|%> "> <% end%>
输入 输出
<%=test.input%> <%= test.output%>
<% end%>
开发语言:
<% if @homework.homework_detail_programing.language.to_i == 1%> C <% elsif @homework.homework_detail_programing.language.to_i == 2%> C++ <% end%>
<% end%>
<% unless @homework.attachments.empty?%> 附件:
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
<% end%>
扣分标准:
<% if @homework.homework_type == 1%> <%= scoring_rules @homework.late_penalty,@homework.id,@is_teacher,@homework.homework_detail_manual.absence_penalty%> <% else%> <%= scoring_rules @homework.late_penalty,@homework.id,@is_teacher%> <% end%>
截止时间:<%= @homework.end_time%>
<% if betweentime(@homework.end_time) < 0 %> <%= l(:label_commit_limit)%> <% else %>
<% end %>