From ed5df9c646896f50efc2c57cb3f4d780c5dc53d4 Mon Sep 17 00:00:00 2001 From: CamilleBeau <51176779+CamilleBeau@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:23:12 -0500 Subject: [PATCH] [examiner] Only show active examiner sites (#8967) Only show active examiner sites in the examiner module. Previously, the module was showing any site that the examiner had once been an examiner at, whether it was active or not. --- CHANGELOG.md | 1 + .../php/examinerprovisioner.class.inc | 37 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c238378954..a4fc1151955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ changes in the following format: PR #1234*** - Add OpenID Connect authorization support to LORIS (PR #8255) #### Bug Fixes +- Fix examiner site display (PR #8967) - bvl_feedback updates in real-time (PR #8966) ## LORIS 25.0 (Release Date: ????-??-??) diff --git a/modules/examiner/php/examinerprovisioner.class.inc b/modules/examiner/php/examinerprovisioner.class.inc index 47c1b9ffc06..91ece0dfd00 100644 --- a/modules/examiner/php/examinerprovisioner.class.inc +++ b/modules/examiner/php/examinerprovisioner.class.inc @@ -37,26 +37,23 @@ class ExaminerProvisioner extends \LORIS\Data\Provisioners\DBRowProvisioner function __construct() { parent::__construct( - " - select - e.full_name as Examiner, - u.Email, - GROUP_CONCAT(DISTINCT psc.CenterID) as centerIds, - e.examinerID as ID, - - e.radiologist as Radiologist, - GROUP_CONCAT(DISTINCT tn.full_name SEPARATOR ', ') as - Certification - - FROM examiners e - LEFT JOIN examiners_psc_rel epr ON - (epr.examinerID=e.examinerID) - LEFT JOIN psc ON (epr.centerID=psc.CenterID) - LEFT JOIN certification c ON - (c.examinerID=e.examinerID and c.pass = 'certified') - LEFT JOIN test_names tn ON (tn.ID = c.testID) - LEFT JOIN users u ON u.ID=e.userID - group by e.examinerID + "SELECT + e.full_name as Examiner, + u.Email, + GROUP_CONCAT(DISTINCT epr.CenterID) as centerIds, + e.examinerID as ID, + e.radiologist as Radiologist, + GROUP_CONCAT(DISTINCT tn.full_name SEPARATOR ', ') as + Certification + FROM examiners e + LEFT JOIN examiners_psc_rel epr ON + (epr.examinerID=e.examinerID) + LEFT JOIN certification c ON + (c.examinerID=e.examinerID and c.pass = 'certified') + LEFT JOIN test_names tn ON (tn.ID = c.testID) + LEFT JOIN users u ON u.ID=e.userID + WHERE epr.active='Y' + GROUP BY e.examinerID ", [], );