挂起作业的作品列表中下拉列表的内容为空,截止时间和发布时间不应显示
This commit is contained in:
parent
b03b9a3c27
commit
da375dcb4e
|
@ -376,6 +376,7 @@ class StudentWorkController < ApplicationController
|
|||
##################################################################################################################
|
||||
@order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name] || "",params[:group]
|
||||
@homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc")
|
||||
@all_homework_commons = @course.homework_commons.order("created_at desc")
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||
@is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评
|
||||
@show_all = false
|
||||
|
|
|
@ -69,16 +69,16 @@
|
|||
<ul class="menu_r">
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="parent">
|
||||
<% @homework_commons.each_with_index do |homework_common,index |%>
|
||||
<% @all_homework_commons.each_with_index do |homework_common,index |%>
|
||||
<% if homework_common.id == @homework.id %>
|
||||
<%="作业 #{@homework_commons.count - index}" %>
|
||||
<%="作业 #{@all_homework_commons.count - index}" %>
|
||||
<% end %>
|
||||
<% end%>
|
||||
</a>
|
||||
<ul>
|
||||
<% @homework_commons.each_with_index do |homework_common,index |%>
|
||||
<% @all_homework_commons.each_with_index do |homework_common,index |%>
|
||||
<li class="pr10">
|
||||
<%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%>
|
||||
<%= link_to "作业#{@all_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)%>
|
||||
</li>
|
||||
<% end%>
|
||||
|
@ -170,13 +170,15 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mt5">
|
||||
<% if @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<div class="fontGrey2 db fl">提交截止时间:<%= @homework.end_time %> 23:59</div>
|
||||
<% elsif @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status >= 2 && @homework.anonymous_comment == 0 %>
|
||||
<div class="fontGrey2 db fl">匿评截止时间:<%= @homework.homework_detail_manual.evaluation_end %> 23:59</div>
|
||||
<% end %>
|
||||
<% if @homework.homework_detail_manual.comment_status == 0 %>
|
||||
<div class="fontGrey2 db fl ml10">发布时间:<%= @homework.publish_time %> 00:00</div>
|
||||
<% if @homework.end_time && @homework.publish_time %>
|
||||
<% if @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<div class="fontGrey2 db fl">提交截止时间:<%= @homework.end_time %> 23:59</div>
|
||||
<% elsif @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status >= 2 && @homework.anonymous_comment == 0 %>
|
||||
<div class="fontGrey2 db fl">匿评截止时间:<%= @homework.homework_detail_manual.evaluation_end %> 23:59</div>
|
||||
<% end %>
|
||||
<% if @homework.homework_detail_manual.comment_status == 0 %>
|
||||
<div class="fontGrey2 db fl ml10">发布时间:<%= @homework.publish_time %> 00:00</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @homework.homework_detail_manual%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 1%>
|
||||
|
|
Loading…
Reference in New Issue