<% content_for :header_tags do %> <%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %> <%= stylesheet_link_tag "/assets/codemirror/codemirror" %> <% end %>
<% if @is_teacher%>
    • <%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :group => @group, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => "export_student_work"%>
    • <% if @homework.student_works.empty?%> <%= link_to "导出作业附件", "javascript:void(0)", class: "hworkExport resourcesGrey", :onclick => "alert('没有学生提交作业,无法下载附件')" %> <% else%> <%= link_to "导出作业附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), remote: true, class: "hworkExport resourcesGrey", :id => "download_homework_attachments" %> <% end%>
    • <%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
    • <%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
    • 评分设置
<% end%>
<% if @homework.homework_detail_manual%> <% if @homework.homework_detail_manual.comment_status == 0 %> 未发布 <% elsif @homework.homework_detail_manual.comment_status == 1%> <% if @homework.anonymous_comment == 0%> 未开启匿评 <% else %> 匿评已禁用 <% end %> 作品提交中 <% elsif @homework.homework_detail_manual.comment_status == 2%> <% if @homework.anonymous_comment == 0%> 匿评中 <% else %> 匿评已禁用 <% end %> 教师评阅中 <% elsif @homework.homework_detail_manual.comment_status == 3%> <% if @homework.anonymous_comment == 0%> 匿评已结束 <% else %> 匿评已禁用 <% end %> 教师评阅中 <% end%> <% end%> [ 隐藏作业信息 ]
发布者:<%= @homework.user.show_name %>
<%= @homework.description.html_safe %>
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
截止时间:<%= @homework.end_time %> 23:59
<% if @homework.homework_detail_manual.comment_status == 0 %>
发布时间:<%= @homework.publish_time %> 00:00
<% end %> <% if @homework.homework_detail_manual%> <% if @homework.homework_detail_manual.comment_status == 1%> <% end_time = @homework.end_time.to_time.to_i + 24*60*60 - 1 %> <% if end_time >= Time.now.to_i %>
提交剩余时间: <%= (end_time - Time.now.to_i) / (24*60*60) %><%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%>
<% else %>
提交已截止
<% end %> <% elsif @homework.homework_detail_manual.comment_status == 2%> <% end_time = @homework.homework_detail_manual.evaluation_end.to_time.to_i + 24*60*60 - 1 %> <% if end_time >= Time.now.to_i %>
匿评剩余时间: <%= (end_time - Time.now.to_i) / (24*60*60)%><%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%>
<% else %>
匿评已截止
<% end %> <% end%> <% end%>
<%= render :partial => "student_work/student_work_list"%>