From 9f0baf518553e24b348504df21a584497e072d83 Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Thu, 4 Apr 2024 10:33:25 -0400 Subject: [PATCH 1/3] [Behavioural_QC] Display profile level feedbacks --- CHANGELOG.md | 1 + .../jsx/tabs_content/behaviouralFeedback.js | 4 ++++ .../php/provisioners/behaviouralprovisioner.class.inc | 9 ++++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91346b860b7..1002c6619c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ changes in the following format: PR #1234*** - Fix examiner site display (PR #8967) - bvl_feedback updates in real-time (PR #8966) - DoB and DoD format respected in candidate parameters (PR #9001) +- Fix profile level feedback display in behavioural QC module (PR #TODO) ## LORIS 25.0 (Release Date: ????-??-??) ### Core diff --git a/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js b/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js index e966aebd16b..4357a77ff46 100644 --- a/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js +++ b/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js @@ -128,6 +128,10 @@ class BehaviouralFeedback extends Component { '&sessionID=' + rowData['sessionID']; bvlLevel ='Visit : ' + rowData['Visit']; + } else { + bvlLink = this.props.baseURL + + '/' + rowData['DCCID'] + bvlLevel ='Profile : ' + rowData['PSCID']; } reactElement = ( diff --git a/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc b/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc index ed705c2a150..3395d3b2b18 100644 --- a/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc +++ b/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc @@ -29,7 +29,7 @@ class BehaviouralProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisione fb.CandID AS _candID, ca.PSCID AS _pscID, s.Visit_label AS _visit, - s.ProjectID AS _project, + COALESCE(s.ProjectID, ca.RegistrationProjectID) AS _project, s.CohortID AS _cohort, psc.CenterID AS _site, fb.FeedbackID AS _feedbackID, @@ -42,10 +42,9 @@ class BehaviouralProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisione FROM feedback_bvl_thread AS fb JOIN candidate ca ON (ca.CandID = fb.CandID) - JOIN session s ON (s.ID = fb.SessionID) - JOIN psc ON (s.CenterID = psc.CenterID) - JOIN project_cohort_rel psr ON - (s.CohortID = psr.CohortID) + LEFT JOIN session s ON (s.ID = fb.SessionID) + LEFT JOIN psc ON (s.CenterID = psc.CenterID) + LEFT JOIN psc psc2 ON (ca.RegistrationCenterID=psc2.CenterID) LEFT JOIN flag f ON (fb.CommentID = f.CommentID) LEFT JOIN test_names tn ON (tn.Test_name = f.Test_name) WHERE From 740def06206dfb8e80515284123920bed3d2307f Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Thu, 4 Apr 2024 10:40:01 -0400 Subject: [PATCH 2/3] Add to changelog & fix site coalesce --- CHANGELOG.md | 2 +- .../php/provisioners/behaviouralprovisioner.class.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1002c6619c8..6f04dd70068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ changes in the following format: PR #1234*** - Fix examiner site display (PR #8967) - bvl_feedback updates in real-time (PR #8966) - DoB and DoD format respected in candidate parameters (PR #9001) -- Fix profile level feedback display in behavioural QC module (PR #TODO) +- Fix profile level feedback display in behavioural QC module (PR #9192) ## LORIS 25.0 (Release Date: ????-??-??) ### Core diff --git a/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc b/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc index 3395d3b2b18..727573fbd2a 100644 --- a/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc +++ b/modules/behavioural_qc/php/provisioners/behaviouralprovisioner.class.inc @@ -31,7 +31,7 @@ class BehaviouralProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisione s.Visit_label AS _visit, COALESCE(s.ProjectID, ca.RegistrationProjectID) AS _project, s.CohortID AS _cohort, - psc.CenterID AS _site, + COALESCE(psc.CenterID, psc2.CenterID) AS _site, fb.FeedbackID AS _feedbackID, fb.SessionID AS _sessionID, fb.CommentID AS _commentID, From 2f3e9d6f8cf8e0929973bc59c5fc93917ab6c966 Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Thu, 4 Apr 2024 10:52:50 -0400 Subject: [PATCH 3/3] missing semicolon --- modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js b/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js index 4357a77ff46..ff9523d3e4b 100644 --- a/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js +++ b/modules/behavioural_qc/jsx/tabs_content/behaviouralFeedback.js @@ -130,7 +130,7 @@ class BehaviouralFeedback extends Component { bvlLevel ='Visit : ' + rowData['Visit']; } else { bvlLink = this.props.baseURL + - '/' + rowData['DCCID'] + '/' + rowData['DCCID']; bvlLevel ='Profile : ' + rowData['PSCID']; } reactElement = (