From 698ae0d772bceb94626331b61e435a46b8099656 Mon Sep 17 00:00:00 2001 From: Laetitia Fesselier Date: Wed, 16 Dec 2020 20:18:35 -0500 Subject: [PATCH] [Conflict Resolver] Multiselect values --- modules/conflict_resolver/php/conflict_resolver.class.inc | 4 ++++ modules/conflict_resolver/php/resolved_conflicts.class.inc | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/conflict_resolver/php/conflict_resolver.class.inc b/modules/conflict_resolver/php/conflict_resolver.class.inc index c1c04af41df..368ea08b03d 100644 --- a/modules/conflict_resolver/php/conflict_resolver.class.inc +++ b/modules/conflict_resolver/php/conflict_resolver.class.inc @@ -406,7 +406,11 @@ class Conflict_Resolver extends \NDB_Menu_Filter_Form $unanonymized = parent::toArray(); $data = array(); + $value1Index = array_search('Value1', $unanonymized['Headers']); + $value2Index = array_search('Value2', $unanonymized['Headers']); foreach ($unanonymized['Data'] as &$row) { + $row[$value1Index] = str_replace('{@}', ', ', $row[$value1Index]); + $row[$value2Index] = str_replace('{@}', ', ', $row[$value2Index]); $data[] = $row; } return array( diff --git a/modules/conflict_resolver/php/resolved_conflicts.class.inc b/modules/conflict_resolver/php/resolved_conflicts.class.inc index cfbefbcf48b..9e57374a3cb 100644 --- a/modules/conflict_resolver/php/resolved_conflicts.class.inc +++ b/modules/conflict_resolver/php/resolved_conflicts.class.inc @@ -252,10 +252,12 @@ class Resolved_Conflicts extends \NDB_Menu_Filter $unanonymized = parent::toArray(); $data = array(); + $correctAnswerIndex = array_search('Correct Answer', $unanonymized['Headers']); foreach ($unanonymized['Data'] as &$row) { + $row[$correctAnswerIndex] = str_replace('{@}', ', ', $row[$correctAnswerIndex]); $data[] = $row; } - return array( + return [ 'Headers' => $unanonymized['Headers'], 'Data' => $data, );