<% @homework_commons.each_with_index do |homework_common,index |%> <% if homework_common.id == @homework.id %> <%="作业 #{@homework_commons.count - index}" %> <% end %> <% end%>
<% @homework_commons.each_with_index do |homework_common,index |%>
<%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%> <%#= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%>
<% 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%>
<%= @homework.name %>
<% if @homework.homework_detail_manual%> <% if @homework.homework_detail_manual.comment_status == 1%>
未开启匿评
<% elsif @homework.homework_detail_manual.comment_status == 2%>
匿评中
<% elsif @homework.homework_detail_manual.comment_status == 3%>
匿评已结束
<% end%> <% end%>
[ 隐藏作业信息 ]
发布者:<%= @homework.user.show_name %>
<%= @homework.description.html_safe %>
[展开]
[收起]
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
截止时间:<%= @homework.end_time %>
<% 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"%>