Skip to content

Commit

Permalink
[Libraries] Feedback panel - fix fieldnames setting (#8848)
Browse files Browse the repository at this point in the history
In the feedback panel for an instrument, the only option in 'Field Name' was 'Across all fields'. This changes how the field names for an instrument are fetched so that all of them appear as an option too.
  • Loading branch information
charlottesce authored Aug 16, 2023
1 parent d69d61e commit c6c05ae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion php/libraries/BVL_Feedback_Panel.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ class BVL_Feedback_Panel
$summary = $this->feedbackThread->getSummaryOfThreads();
$this->tpl_data['thread_summary_headers'] = json_encode($summary);

$field_names = Utility::getSourcefields($_REQUEST['test_name'] ?? '');
$test_name = '';
if (array_key_exists('test_name', $_REQUEST)) {
$test_name = $_REQUEST['test_name'];
} else if (array_key_exists('lorispath', $_REQUEST)) {
$test_name = preg_split("#/#", $_REQUEST['lorispath'])[1] ?? '';
}

// Get field names
$field_names = Utility::getSourcefields($test_name);
$fields = [];
$fields['Across All Fields'] = 'Across All Fields';
foreach ($field_names as $field_name) {
Expand Down

0 comments on commit c6c05ae

Please # to comment.