diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb
index e45bdfabb..0e5e956ca 100644
--- a/app/views/poll/index.html.erb
+++ b/app/views/poll/index.html.erb
@@ -11,34 +11,46 @@
<% @polls.each do |poll|%>
-
- -
- <% if has_commit_poll?(poll.id ,User.current) %>
- <%= poll.polls_name %>
- <% else %>
- <%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %>
- <% end %>
-
- -
- <%if @is_teacher%>
- <%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%>
- <% end%>
-
- -
- <% if @is_teacher%>
- <%= link_to(l(:button_delete), poll,
- method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml20 mr10") %>
- <% end%>
-
- -
- <% if @is_teacher%>
- <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%>
- <% end%>
-
- -
- <%= format_time poll.created_at%>
-
-
+
+ <% unless !@is_teacher && poll.polls_status != 2 %>
+
+ -
+ <% if @is_teacher %>
+ <% if has_commit_poll?(poll.id ,User.current) %>
+ <%= poll.polls_name %>
+ <% else %>
+ <%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %>
+ <% end %>
+ <% else %>
+ <% if has_commit_poll?(poll.id ,User.current) && poll.polls_status == 2 %>
+ <%= poll.polls_name %>
+ <% elsif (!has_commit_poll?(poll.id ,User.current)) && poll.polls_status == 2 %>
+ <%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %>
+ <% end %>
+ <% end %>
+
+ -
+ <%if @is_teacher%>
+ <%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%>
+ <% end%>
+
+ -
+ <% if @is_teacher && poll.polls_status == 1 #新建状态的问卷可删除%>
+ <%= link_to(l(:button_delete), poll,
+ method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml20 mr10") %>
+ <% end%>
+
+ -
+ <% if @is_teacher && poll.polls_status == 1 #新建状态的问卷可编辑%>
+ <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%>
+ <% end%>
+
+ -
+ <%= format_time poll.created_at%>
+
+
+ <% end %>
+
<% end%>
diff --git a/app/views/poll/show.html.erb b/app/views/poll/show.html.erb
index dca45c25c..2db0045f6 100644
--- a/app/views/poll/show.html.erb
+++ b/app/views/poll/show.html.erb
@@ -217,7 +217,9 @@
- <%= link_to "提交",commit_poll_poll_path(@poll), :method => :post,:class => "ur_button",:format => 'js',:remote=>true %>
+ <% if @poll.polls_status == 2 %>
+ <%= link_to "提交",commit_poll_poll_path(@poll), :method => :post,:class => "ur_button",:format => 'js',:remote=>true %>
+ <% end %>
答题已完成 0%