From b43418320d384cd1b37799ac051994a4c2e99eff Mon Sep 17 00:00:00 2001
From: Gabriel Jenik
Date: Mon, 3 May 2021 09:54:00 -0300
Subject: [PATCH] Fixed issue #17256: No warning about adjusted question codes
is shown when importing a group which holds questions with already used
question codes (#1859)
Co-authored-by: encuestabizdevgit
---
application/helpers/admin/import_helper.php | 9 +++++++++
.../questionGroupsAdministration/import_view.php | 11 +++++++++++
2 files changed, 20 insertions(+)
diff --git a/application/helpers/admin/import_helper.php b/application/helpers/admin/import_helper.php
index d5f44a2d141..86cfe028275 100644
--- a/application/helpers/admin/import_helper.php
+++ b/application/helpers/admin/import_helper.php
@@ -587,6 +587,15 @@ function XMLImportGroup($sFullFilePath, $iNewSID, $bTranslateLinksFields)
LimeExpressionManager::RevertUpgradeConditionsToRelevance($iNewSID);
LimeExpressionManager::UpgradeConditionsToRelevance($iNewSID);
+ if (count($aQuestionCodeReplacements)) {
+ array_unshift(
+ $results['importwarnings'],
+ ""
+ . gT('Attention: Several question codes were updated. Please check these carefully as the update may not be perfect with customized expressions.')
+ . ''
+ );
+ }
+
$results['newgid'] = $newgid;
$results['labelsets'] = 0;
$results['labels'] = 0;
diff --git a/application/views/questionGroupsAdministration/import_view.php b/application/views/questionGroupsAdministration/import_view.php
index 0d133e7f95d..e99b0d99d51 100644
--- a/application/views/questionGroupsAdministration/import_view.php
+++ b/application/views/questionGroupsAdministration/import_view.php
@@ -37,6 +37,17 @@
+
+
+ 0): ?>
+ :
+
+
+