-
- <% common_answers = !section.questions.flat_map(&:answers).select(&:is_common?).empty? %>
+ <% section_has_common_answers = plan.datasets.first.has_common_answers?(section.id) %>
<% plan.datasets.each_with_index do |dataset, i| %>
-
- +
- <%= dataset.name %> + <%= section_has_common_answers %> <% end if plan.datasets.count > 1 %> @@ -58,7 +59,7 @@
<% if dataset.main? && plan.datasets.count > 1 %>
<% end %>
- <% if has_common_answers %>
+ <% if section_has_common_answers %>
<% break %>
<% end %>
<% end %>
- ><%= _('This section\'s answers are common to all datasets') %> + ><%= _('This section\'s answers are common to all datasets') %>
<% end %><%= sanitize section.description %>
diff --git a/app/views/branded/shared/export/_plan.erb b/app/views/branded/shared/export/_plan.erb
index 57a097a..6b3fea4 100644
--- a/app/views/branded/shared/export/_plan.erb
+++ b/app/views/branded/shared/export/_plan.erb
@@ -27,13 +27,15 @@