From b9a4d10186f0d2d45f81e3a214ac7bff448a4955 Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Tue, 21 Nov 2023 08:00:41 -0500 Subject: [PATCH 1/2] [bvl_feedback] Update summary in real time --- .../ajax/open_bvl_feedback_thread.php | 5 ++++- .../jsx/react.behavioural_feedback_panel.js | 16 ++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/bvl_feedback/ajax/open_bvl_feedback_thread.php b/modules/bvl_feedback/ajax/open_bvl_feedback_thread.php index 3fb83b1588c..ee41a80b167 100644 --- a/modules/bvl_feedback/ajax/open_bvl_feedback_thread.php +++ b/modules/bvl_feedback/ajax/open_bvl_feedback_thread.php @@ -38,6 +38,9 @@ exit; } -header("HTTP/1.1 204 No Content"); +header("Content-Type: application/json"); +print json_encode( + ['status' => 'success'] +); exit; diff --git a/modules/bvl_feedback/jsx/react.behavioural_feedback_panel.js b/modules/bvl_feedback/jsx/react.behavioural_feedback_panel.js index 94837bf149e..f479e551b98 100644 --- a/modules/bvl_feedback/jsx/react.behavioural_feedback_panel.js +++ b/modules/bvl_feedback/jsx/react.behavioural_feedback_panel.js @@ -900,11 +900,9 @@ class FeedbackPanel extends Component { console.error(response.status + ': ' + response.statusText); return; } - - response.json().then(() => { - this.setState({threads: threads}); - this.loadSummaryServerData(); - }); + this.setState({threads: threads}); + this.loadSummaryServerData(); + this.loadThreadServerState(); }).catch((error) => { console.error(error); }); @@ -936,11 +934,9 @@ class FeedbackPanel extends Component { console.error(response.status + ': ' + response.statusText); return; } - - response.json().then(() => { - this.setState({threads: threads}); - this.loadSummaryServerData(); - }); + this.setState({threads: threads}); + this.loadSummaryServerData(); + this.loadThreadServerState(); }).catch((error) => { console.error(error); }); From bf5845afb5eb5eccd25f9253dd42f63aa6cf472d Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Tue, 21 Nov 2023 08:07:30 -0500 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83517134028..7c238378954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ changes in the following format: PR #1234*** #### Features - Add OpenID Connect authorization support to LORIS (PR #8255) +#### Bug Fixes +- bvl_feedback updates in real-time (PR #8966) + ## LORIS 25.0 (Release Date: ????-??-??) ### Core #### Features