diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index cc8159821..971b2e3eb 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -76,7 +76,8 @@ <% end %> <% end %> <% if (User.current.admin?||User.current.id==bid.author_id) %> - + <% if bid.open_anonymous_evaluation == 1%> + <% case bid.comment_status %> <% when 0 %> <%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %> @@ -86,6 +87,7 @@ 匿评结束 <% end %> + <%end%> <%= link_to( l(:button_edit), diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 6a1db48d5..bea708537 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -106,6 +106,7 @@ <% if (User.current.admin?||User.current.id==@bid.author_id) %> + <% if bid.open_anonymous_evaluation == 1%> <% case @bid.comment_status %> <% when 0 %> @@ -116,6 +117,7 @@ 匿评结束 <% end %> + <%end%> <% end %>