作业添加挂起的状态
This commit is contained in:
parent
9b573248d8
commit
050257e885
|
@ -2512,7 +2512,7 @@ module ApplicationHelper
|
|||
|
||||
#获取匿评相关连接代码
|
||||
def homework_anonymous_comment (homework, is_in_course, user_activity_id = -1, course_activity = -1)
|
||||
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
if homework.homework_detail_manual.comment_status == 0 ||Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
||||
elsif homework.student_works.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
||||
case homework.homework_detail_manual.comment_status
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
</span>
|
||||
|
||||
<% if homework_common.homework_detail_manual%>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 && homework_common.publish_time.nil? %>
|
||||
<span class="grey_homework_btn_cir ml5">挂起</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
|
@ -84,12 +86,12 @@
|
|||
分组人数:<%=homework_common.homework_detail_group.min_num %>-<%=homework_common.homework_detail_group.max_num %> 人
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status < 2 %>
|
||||
<% if homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status < 2 && !homework_common.publish_time.nil? %>
|
||||
<div class="homepagePostDeadline">提交截止时间:<%= homework_common.end_time.to_s %> 23:59</div>
|
||||
<% elsif homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status >= 2 %>
|
||||
<% elsif homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status >= 2 && !homework_common.publish_time.nil? %>
|
||||
<div class="homepagePostDeadline">匿评截止时间:<%= homework_common.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 && !homework_common.publish_time.nil? %>
|
||||
<div class="homepagePostDeadline ml15">
|
||||
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
|
||||
</div>
|
||||
|
@ -107,7 +109,7 @@
|
|||
<div class="homepagePostDeadline">
|
||||
迟交扣分:<%= homework_common.late_penalty%>分
|
||||
</div>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<% if homework_common.anonymous_comment == 0 && !homework_common.publish_time.nil?%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_start_time_<%=homework_common.id %>">
|
||||
匿评开启时间:<%= homework_common.homework_detail_manual.evaluation_start%> 00:00
|
||||
</div>
|
||||
|
@ -120,7 +122,7 @@
|
|||
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<% if homework_common.anonymous_comment == 0 && !homework_common.publish_time.nil?%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
|
||||
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue