- <% unless idx == 0 && question.text == section.title %>
+ <% questions = @exported_plan.questions_for_section(section.id)
+ if questions.present?
+ %>
+
<%= raw question.text %>
- <% end %>
- <% answer = @plan.answer(question.id, false) %>
- <% if answer.nil? then %>
-
<%= _('Question not answered.') -%>
- <% else %>
- <% q_format = question.question_format %>
- <% if q_format.option_based? %>
-
- <% answer.question_options.each do |option| %>
- - <%= option.text %>
- <% end %>
-
-
- <% if question.option_comment_display == true then%>
+ <% answer = @plan.answer(question.id, false) %>
+ <% if answer.nil? then %>
+
<%= _('Question not answered.') -%>
+ <% else %>
+ <% q_format = question.question_format %>
+ <% if q_format.option_based? %>
+
+ <% answer.question_options.each do |option| %>
+ - <%= option.text %>
+ <% end %>
+
+
+ <% if question.option_comment_display == true then%>
+ <% if !answer.text.nil? then %>
+ <%= raw answer.text.gsub(/
(\s|| |<\/td>| )*(<\/tr>| |
)/,"") %>
+ <%end%>
+ <%end%>
+ <%else%>
+
<% if !answer.text.nil? then %>
<%= raw answer.text.gsub(/
(\s|| |<\/td>| )*(<\/tr>| |
)/,"") %>
<%end%>
- <%end%>
- <%else%>
-
- <% if !answer.text.nil? then %>
- <%= raw answer.text.gsub(/
(\s|| |<\/td>| )*(<\/tr>| |
)/,"") %>
- <%end%>
- <% end %>
- <% end %>
-
+ <% end %>
+ <% end %>
+
+ <% end %>
<% end %>
<% end %>