parent
0f14fbef98
commit
334a99bcef
|
@ -1004,7 +1004,7 @@ class BidsController < ApplicationController
|
|||
# 启动匿评
|
||||
def start_anonymous_comment
|
||||
@bid = Bid.find(params[:id])
|
||||
if(@bid.comment_status == 1)
|
||||
if(@bid.comment_status == 0)
|
||||
homeworks = @bid.homeworks
|
||||
if(homeworks && homeworks.count >= 4)
|
||||
@bid.update_column('comment_status', 1)
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
<span id="bid_deadline_span">
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<p style="display: none;">
|
||||
<%= f.select :is_evaluation, is_evaluation_option %>
|
||||
</p>
|
||||
<p style="display: none;">
|
||||
<p>
|
||||
<%= f.select :proportion, proportion_option %>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<% if @bid.comment_status == 1 %>
|
||||
<!-- 处于开启匿评阶段,可以正常评分 -->
|
||||
<li class="wping">
|
||||
<%= link_to l(:label_work_rating),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
|
||||
<%= link_to l(:label_anonymous_comments),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
|
||||
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red"> 迟交!</span>
|
||||
<% end %>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<% elsif @bid.comment_status == 2%>
|
||||
<!-- 处于匿评已关闭阶段,不容许评分 -->
|
||||
<li class="wping" title="关闭匿评后不可继续评分">
|
||||
<a style="color:#8e8e8e;">评分</a>
|
||||
<a style="background:#8e8e8e;"><%= l(:label_anonymous_comments) %></a>
|
||||
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red"> 迟交!</span>
|
||||
<% end %>
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
<% if @bid.comment_status == 0 %>
|
||||
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
|
||||
<li class="wping">
|
||||
<%= link_to "创建作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
|
||||
<%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="wping">
|
||||
<a style="width:80px; margin:20px 0 0 350px;">创建作业</a>
|
||||
<li class="wping" title="只有开启匿评之前才能创建作业哦!">
|
||||
<a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue