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

mciea-main
Nelson Jovel 2 years ago
parent 5824a058c3
commit 5c9a999b3c

@ -1,13 +1,13 @@
<g class="grouped-bar-column" data-for-measure-id="<%= column.measure.measure_id %>"> <g class="grouped-bar-column" data-for-measure-id="<%= column.measure.measure_id %>">
<% 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| %> <% column.bars.each_with_index do |bar, index| %>
<% if column.sufficient_data?(index) %>
<rect <rect
<% if column.show_popover? %> <% if column.show_popover? %>
data-bs-toggle="popover" data-bs-toggle="popover"
data-bs-placement="right" data-bs-placement="right"
data-bs-content="<%= column.popover_content(index) %>" data-bs-content="<%= column.popover_content(index) %>"
<% end %> <% end %>
data-for-academic-year="<%= bar.academic_year.range %>" data-for-academic-year="<%= bar.academic_year.range %>"
x="<%= bar.x_position %>%" x="<%= bar.x_position %>%"
y="<%= bar.y_offset %>%" y="<%= bar.y_offset %>%"
@ -17,6 +17,16 @@
<% if ENV["SCORES"].present? && ENV["SCORES"].upcase == "SHOW" %> <% if ENV["SCORES"].present? && ENV["SCORES"].upcase == "SHOW" %>
<text x="<%= bar.x_position + (column.bar_width * 0.5) %>%" y="<%= score_label_y[index] %>%" text-anchor="middle" dominant-baseline="middle"> <text x="<%= bar.x_position + (column.bar_width * 0.5) %>%" y="<%= score_label_y[index] %>%" text-anchor="middle" dominant-baseline="middle">
<<<<<<< Updated upstream
<%= bar.average %>
</text>
<% end %>
<% end %>
<% end %>
<line x1="<%= column.column_start_x %>%" y1="0" x2="<%= column.column_start_x %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2" />
||||||| constructed merge base
<%= bar.average %> <%= bar.average %>
</text> </text>
<% end %> <% end %>
@ -25,14 +35,20 @@
<% end %> <% end %>
<line x1="<%= column.column_start_x %>%" y1="0" x2="<%= column.column_start_x %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2" /> <line x1="<%= column.column_start_x %>%" y1="0" x2="<%= column.column_start_x %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2" />
=======
<%= bar.average %>
</text>
<% end %>
<% end %>
<line x1="<%= column.column_start_x %>%" y1="0" x2="<%= column.column_start_x %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2" />
>>>>>>> Stashed changes
<% words = column.label %> <% words = column.label %>
<% words.each_with_index do | line, index | %> <% words.each_with_index do | line, index | %>
<text class="graph-footer" x="<%= column.column_midpoint %>%" y="<%= column.bar_label_height + (index * 5) %>%" text-anchor="middle" dominant-baseline="middle" data-grouped-bar-label="<%= column.label %>"> <text class="graph-footer" x="<%= column.column_midpoint %>%" y="<%= column.bar_label_height + (index * 5) %>%" text-anchor="middle" dominant-baseline="middle" data-grouped-bar-label="<%= column.label %>">
<%= line %> <%= line %>
</text> </text>
<% end %> <% end %>
<% if column.show_irrelevancy_message? %>
<% if column.show_irrelevancy_message? %>
<rect x="<%= column.message_x %>%" y="<%= column.message_y %>%" rx="15" ry="15" width="<%= column.message_width %>%" height="<%= column.message_height %>%" fill="white" stroke="gray" /> <rect x="<%= column.message_x %>%" y="<%= column.message_y %>%" rx="15" ry="15" width="<%= column.message_width %>%" height="<%= column.message_height %>%" fill="white" stroke="gray" />
<text x="<%= column.column_midpoint %>%" y="<%= 20 %>%" text-anchor="middle"> <text x="<%= column.column_midpoint %>%" y="<%= 20 %>%" text-anchor="middle">
@ -40,7 +56,7 @@
<tspan x="<%= column.column_midpoint %>%" y="34%">based on</tspan> <tspan x="<%= column.column_midpoint %>%" y="34%">based on</tspan>
<tspan x="<%= column.column_midpoint %>%" y="39%"><%= column.basis %></tspan> <tspan x="<%= column.column_midpoint %>%" y="39%"><%= column.basis %></tspan>
</text> </text>
<% elsif column.show_insufficient_data_message? %> <% elsif column.show_insufficient_data_message? %>
<rect x="<%= column.message_x %>%" y="<%= column.message_y %>%" rx="15" ry="15" width="<%= column.message_width %>%" height="<%= column.message_height %>%" fill="white" stroke="gray" /> <rect x="<%= column.message_x %>%" y="<%= column.message_y %>%" rx="15" ry="15" width="<%= column.message_width %>%" height="<%= column.message_height %>%" fill="white" stroke="gray" />
<text x="<%= column.column_midpoint %>%" y="<%= 20 %>%" text-anchor="middle"> <text x="<%= column.column_midpoint %>%" y="<%= 20 %>%" text-anchor="middle">
@ -49,5 +65,5 @@
<tspan x='<%= column.column_midpoint %>%' y='<%= offset %>%'><%= line %></tspan> <tspan x='<%= column.column_midpoint %>%' y='<%= offset %>%'><%= line %></tspan>
<% end %> <% end %>
</text> </text>
<% end %> <% end %>
</g> </g>

Loading…
Cancel
Save