From d3d3638c1c9d2c55ff215e3c5eb0d3474d2573e2 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 19 Jan 2026 12:57:10 +0000 Subject: [PATCH] Refactor score filtering logic in exam scores user template for consistent layout --- anatomy/templates/anatomy/exam_scores_user.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/anatomy/templates/anatomy/exam_scores_user.html b/anatomy/templates/anatomy/exam_scores_user.html index 373115a8..b1baf829 100644 --- a/anatomy/templates/anatomy/exam_scores_user.html +++ b/anatomy/templates/anatomy/exam_scores_user.html @@ -112,12 +112,12 @@ $(document).ready(function () { $("#hide-viewer").on('click', function(){ $('.viewer-block .viewer-body').toggle(); }); - // Filter questions by score + // Filter questions by score using Bootstrap's d-none for consistent layout $("#filter-score").on('change', function(){ const val = $(this).val(); $(".list-group-item[data-score]").each(function(){ const s = $(this).data('score'); - if(val === 'all' || String(s) === String(val)) $(this).show(); else $(this).hide(); + if(val === 'all' || String(s) === String(val)) $(this).removeClass('d-none'); else $(this).addClass('d-none'); }); }); @@ -147,7 +147,7 @@ }); // auto-click first view button to populate viewer - const firstView = $(".view-question-button").first(); + const firstView = $(".view-question-button:visible").first(); if(firstView.length){ firstView.click(); } });