第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
+
<%end%>
diff --git a/app/views/poll/_show_mulit_result.html.erb b/app/views/poll/_show_mulit_result.html.erb
index da72ea35d..14ba41d5b 100644
--- a/app/views/poll/_show_mulit_result.html.erb
+++ b/app/views/poll/_show_mulit_result.html.erb
@@ -2,6 +2,7 @@
第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
+
[多行主观题]
<%if poll_question.is_necessary == 1%>
*
<%end%>
diff --git a/app/views/poll/_show_single_result.html.erb b/app/views/poll/_show_single_result.html.erb
index 4fbf3698f..c5fcd4ed4 100644
--- a/app/views/poll/_show_single_result.html.erb
+++ b/app/views/poll/_show_single_result.html.erb
@@ -2,6 +2,7 @@
第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
+
[主观题]
<%if poll_question.is_necessary == 1%>
*
<%end%>
diff --git a/app/views/poll/poll_result.html.erb b/app/views/poll/poll_result.html.erb
index bb9aa7f63..59096fd8c 100644
--- a/app/views/poll/poll_result.html.erb
+++ b/app/views/poll/poll_result.html.erb
@@ -7,50 +7,23 @@
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
- <% mc_question_list = @poll.poll_questions.where("question_type=1") %>
- <% mcq_question_list = @poll.poll_questions.where("question_type=2") %>
- <% single_question_list = @poll.poll_questions.where("question_type=3") %>
- <% multi_question_list = @poll.poll_questions.where("question_type=4") %>
-
">
-
单选题
- <% mc_question_list.each do |poll_question| %>
-
-
- <%= render :partial => 'show_MC_result', :locals => {:poll_question => poll_question} %>
+ <% @poll_questions.each do |poll_question|%>
+
+
+
+ <% if poll_question.question_type == 1%>
+ <%= render :partial => 'show_MC_result', :locals => {:poll_question => poll_question} %>
+ <% elsif poll_question.question_type == 2%>
+ <%= render :partial => 'show_MCQ_result', :locals => {:poll_question => poll_question} %>
+ <% elsif poll_question.question_type == 3%>
+ <%= render :partial => 'show_single_result', :locals => {:poll_question => poll_question} %>
+ <% elsif poll_question.question_type == 4%>
+ <%= render :partial => 'show_mulit_result', :locals => {:poll_question => poll_question} %>
+ <% end%>
+
- <% end %>
-
-
">
-
多选题
- <% mcq_question_list.each do |poll_question| %>
-
-
- <%= render :partial => 'show_MCQ_result', :locals => {:poll_question => poll_question} %>
-
-
- <% end %>
-
-
">
-
单行主观题
- <% single_question_list.each do |poll_question| %>
-
-
- <%= render :partial => 'show_single_result', :locals => {:poll_question => poll_question} %>
-
-
- <% end %>
-
-
">
-
多行主观题
- <% multi_question_list.each do |poll_question| %>
-
-
- <%= render :partial => 'show_mulit_result', :locals => {:poll_question => poll_question} %>
-
-
- <% end %>
-
+ <% end%>