若测验已截止且学生已提交则在测验列表后面显示“已答”

This commit is contained in:
cxt 2015-12-15 15:37:57 +08:00
parent 0deffdba33
commit 0215e5e38c
2 changed files with 5 additions and 2 deletions

View File

@ -57,6 +57,9 @@
<li class="pollsbtn_tip fl ml5">已答</li-->
<%#else%>
<%= link_to (index.to_i+1).to_s+". "+exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_st fl c_dblue"%>
<% if exercise.end_time <= Time.now && has_commit_exercise?(exercise.id, User.current.id) %>
<li class="pollsbtn_tip fl ml5">已答</li>
<% end %>
<%#end%>
<% end%>
<li class="polls_date fr mr10">截止时间:<%= format_time(exercise.end_time.to_s)%></li>