From 15329f039044a5da47b23d62f69408a94c0e5d72 Mon Sep 17 00:00:00 2001 From: Nelson Jovel Date: Fri, 17 May 2024 08:52:13 -0700 Subject: [PATCH] fix: When multiple years were selected on the Analyze page, results were getting incorrectly filtered out when the first academic year did not have sufficient responses. Now all selected years with data are correctly displayed --- .../analyze/_grouped_bar_column.html.erb | 52 ++++++++++++------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/app/views/analyze/_grouped_bar_column.html.erb b/app/views/analyze/_grouped_bar_column.html.erb index 3d2b026e..183d1596 100644 --- a/app/views/analyze/_grouped_bar_column.html.erb +++ b/app/views/analyze/_grouped_bar_column.html.erb @@ -1,13 +1,13 @@ -<% score_label_y = [5, 10, 15, 5, 10, 15 ] %> + <% score_label_y = [5, 10, 15, 5, 10, 15 ] %> <% column.bars.each_with_index do |bar, index| %> - <% if column.sufficient_data?(index) %> - - data-bs-toggle="popover" - data-bs-placement="right" - data-bs-content="<%= column.popover_content(index) %>" + data-bs-toggle="popover" + data-bs-placement="right" + data-bs-content="<%= column.popover_content(index) %>" <% end %> + data-for-academic-year="<%= bar.academic_year.range %>" x="<%= bar.x_position %>%" y="<%= bar.y_offset %>%" @@ -17,6 +17,7 @@ <% if ENV["SCORES"].present? && ENV["SCORES"].upcase == "SHOW" %> +<<<<<<< Updated upstream <%= bar.average %> <% end %> @@ -25,22 +26,37 @@ <% end %> - <% words = column.label %> - <% words.each_with_index do | line, index | %> - - <%= line %> +||||||| constructed merge base + <%= bar.average %> <% end %> - <% if column.show_irrelevancy_message? %> + <% end %> + <% end %> + + +======= + <%= bar.average %> + + <% end %> +<% end %> + +>>>>>>> Stashed changes + <% words = column.label %> + <% words.each_with_index do | line, index | %> + + <%= line %> + +<% end %> +<% if column.show_irrelevancy_message? %> - measure not - based on - <%= column.basis %> - - <% elsif column.show_insufficient_data_message? %> + measure not + based on + <%= column.basis %> + +<% elsif column.show_insufficient_data_message? %> @@ -48,6 +64,6 @@ <% offset = 29 + index * 5 %> <%= line %> <% end %> - - <% end %> + +<% end %>