1.增加匿评阶段课程作业列表界面不可提交作业

2.增加匿评关闭阶段可提交作业
This commit is contained in:
sw 2014-11-18 16:13:11 +08:00
parent d0e549fc85
commit 6bfbf5bd2b
2 changed files with 9 additions and 3 deletions

View File

@ -45,7 +45,13 @@
<% if User.current.logged? && is_cur_course_student(@course) %>
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
<% if cur_user_homework!= nil && cur_user_homework.empty? %>
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
<% if bid.comment_status == 0 || bid.comment_status == 2%>
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
<% else %>
<span title="匿评阶段不可提交作业!">
<%= l(:label_commit_homework)%>
</span>
<% end %>
<% else %>
<span style="color: green; float: right">
<%= l(:lable_has_commit_homework)%>

View File

@ -35,13 +35,13 @@
</span>
</li>
<li class="c_red" style="margin:25px 0 0 20px;"> 您还没交作业,请创建作业!</li>
<% if @bid.comment_status == 0 %>
<% if @bid.comment_status == 0 || @bid.comment_status == 1%>
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
<li class="wping">
<%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
</li>
<% else %>
<li class="wping" title="只有开启匿评之前才能创建作业哦">
<li class="wping" title="匿评阶段不可提交作业">
<a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
</li>
<% end %>