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 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); });