Index: openacs-4/packages/proctoring-support/lib/proctoring-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/proctoring-display.tcl,v diff -u -r1.1.2.25 -r1.1.2.26 --- openacs-4/packages/proctoring-support/lib/proctoring-display.tcl 2 Aug 2023 17:26:06 -0000 1.1.2.25 +++ openacs-4/packages/proctoring-support/lib/proctoring-display.tcl 3 Oct 2023 14:37:38 -0000 1.1.2.26 @@ -297,25 +297,19 @@ p.last_name || ' ' || p.first_names as name, count(*) as n_artifacts, count( - (select 1 from - jsonb_path_query(a.metadata->'revisions', - '$[*] ? (@.flag == "false")') - fetch first 1 rows only - ) - ) as n_reviewed, + jsonb_path_exists(a.metadata->'revisions', + '$[*] ? (@.flag == "false")') + ) as n_reviewed, count( - (select 1 from - jsonb_path_query(a.metadata->'revisions', + jsonb_path_exists(a.metadata->'revisions', '$[*] ? (@.flag == "true")') - fetch first 1 rows only - ) - ) as n_flagged + ) as n_flagged from proctoring_object_artifacts a, persons p where object_id = :object_id and (a.type = 'audio' or a.name = (case when exists (select 1 from proctoring_object_artifacts - where object_id = a.object_id + where object_id = :object_id and type <> 'audio' and name = 'camera') then 'camera' else 'desktop' end))