Index: openacs-4/packages/proctoring-support/lib/proctoring-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/Attic/proctoring-display.adp,v diff -u -N -r1.1.2.6 -r1.1.2.7 --- openacs-4/packages/proctoring-support/lib/proctoring-display.adp 17 Feb 2022 18:28:26 -0000 1.1.2.6 +++ openacs-4/packages/proctoring-support/lib/proctoring-display.adp 18 Feb 2022 12:21:22 -0000 1.1.2.7 @@ -300,16 +300,23 @@ filterValue = r.value; } } + // Hide/show artifacts according to the filter: for (e of document.querySelectorAll("#event-list [name='data']")) { if (filterValue === 'all') { + // - every artifact e.style.display = null; } else if (filterValue === 'flagged') { + // - flagged artifacts e.style.display = e.classList.contains('flagged') ? null : 'none'; } else if (filterValue === 'unflagged') { - e.style.display = e.classList.contains('flagged') ? 'none': null; + // - artifacts with a comment that have not been flagged + e.style.display = e.querySelector("[data-msg]") && + !e.classList.contains('flagged') ? null : 'none'; } else if (filterValue === 'reviewed') { + // - artifacts with a comment e.style.display = e.querySelector("[data-msg]") ? null : 'none'; } else if (filterValue === 'not-reviewed') { + // - artifacts without a comment e.style.display = e.querySelector("[data-msg]") ? 'none' : null; } total++;