1.修改未开启匿评学生界面取消匿评列表界面显示

2.修改未开启匿评学生直接进入众评点赞界面
This commit is contained in:
sw 2014-11-19 11:11:28 +08:00
parent ff185852eb
commit f560e9f494
2 changed files with 10 additions and 7 deletions

View File

@ -43,9 +43,9 @@
<% end %>
<% unless @is_teacher%>
<% if @bid.comment_status == 0%>
<% if @bid.comment_status == 0 && @bid.open_anonymous_evaluation == 1%>
$("#my_homework").click();
<% elsif @bid.comment_status == 2%>
<% elsif @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%>
$("#all_homeworks").click();
<% end %>
<% end %>

View File

@ -28,14 +28,17 @@
</ul>
<% else %>
<ul>
<li id="tb_5" class="hovertab">
<%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%>
</li>
<% if @bid.open_anonymous_evaluation == 1%>
<li id="tb_5" class="hovertab">
<!-- 开启了匿评才能看到匿评列表 -->
<%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%>
</li>
<% end %>
<li id="tb_6" class="normaltab">
<%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'my_homework',:remote => true}%>
</li>
<% if @bid.comment_status == 2 %>
<!-- 匿评结束后才能看到全部作业列表 -->
<% if @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%>
<!-- 匿评结束后或者未开启匿评才能看到全部作业列表 -->
<li id="tb_7" class="normaltab">
<%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {id: 'all_homeworks',:remote => true}%>
</li>