1.取消老师修改作业时启动互评按钮显示

2创建作业改为提交作业
3.修改不能评分时的样式
This commit is contained in:
sw 2014-11-04 15:41:10 +08:00
parent 0f14fbef98
commit 334a99bcef
4 changed files with 8 additions and 8 deletions

View File

@ -1004,7 +1004,7 @@ class BidsController < ApplicationController
# 启动匿评 # 启动匿评
def start_anonymous_comment def start_anonymous_comment
@bid = Bid.find(params[:id]) @bid = Bid.find(params[:id])
if(@bid.comment_status == 1) if(@bid.comment_status == 0)
homeworks = @bid.homeworks homeworks = @bid.homeworks
if(homeworks && homeworks.count >= 4) if(homeworks && homeworks.count >= 4)
@bid.update_column('comment_status', 1) @bid.update_column('comment_status', 1)

View File

@ -37,10 +37,10 @@
<span id="bid_deadline_span"> <span id="bid_deadline_span">
</span> </span>
</p> </p>
<p> <p style="display: none;">
<%= f.select :is_evaluation, is_evaluation_option %> <%= f.select :is_evaluation, is_evaluation_option %>
</p> </p>
<p style="display: none;"> <p>
<%= f.select :proportion, proportion_option %> <%= f.select :proportion, proportion_option %>
</p> </p>
<p> <p>

View File

@ -78,7 +78,7 @@
<% if @bid.comment_status == 1 %> <% if @bid.comment_status == 1 %>
<!-- 处于开启匿评阶段,可以正常评分 --> <!-- 处于开启匿评阶段,可以正常评分 -->
<li class="wping"> <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") %> <% 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">&nbsp;&nbsp;迟交!</span> <span class="c_red">&nbsp;&nbsp;迟交!</span>
<% end %> <% end %>
@ -86,7 +86,7 @@
<% elsif @bid.comment_status == 2%> <% elsif @bid.comment_status == 2%>
<!-- 处于匿评已关闭阶段,不容许评分 --> <!-- 处于匿评已关闭阶段,不容许评分 -->
<li class="wping" title="关闭匿评后不可继续评分"> <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") %> <% 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">&nbsp;&nbsp;迟交!</span> <span class="c_red">&nbsp;&nbsp;迟交!</span>
<% end %> <% end %>

View File

@ -35,11 +35,11 @@
<% if @bid.comment_status == 0 %> <% if @bid.comment_status == 0 %>
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 --> <!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
<li class="wping"> <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> </li>
<% else %> <% else %>
<li class="wping"> <li class="wping" title="只有开启匿评之前才能创建作业哦!">
<a style="width:80px; margin:20px 0 0 350px;">创建作业</a> <a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
</li> </li>
<% end %> <% end %>
</ul> </ul>