Skip to content

Commit

Permalink
Fixed issue #17646: Cannot import version 3 lsq file in to LS5 (#2168)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljenik committed Dec 3, 2021
1 parent fa206fd commit fbfebff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -92,7 +92,7 @@
<!-- Import -->
<?php if($hasSurveyContentCreatePermission):?>
<?php if($oSurvey->active!='Y'): ?>
<a class="btn btn-default" id="import-button" href="<?php echo Yii::App()->createUrl("questionAdministration/importView/surveyid/$surveyid"); ?>" role="button">
<a class="btn btn-default" id="import-button" href="<?php echo Yii::App()->createUrl("questionAdministration/importView", ["surveyid" => $surveyid, "groupid" => $gid]); ?>" role="button">
<span class="icon-import icon"></span>
<?php eT("Import question"); ?>
</a>
Expand Down
3 changes: 2 additions & 1 deletion application/helpers/admin/import_helper.php
Expand Up @@ -651,10 +651,11 @@ function XMLImportQuestion($sFullFilePath, $iNewSID, $iNewGID, $options = array(

switchMSSQLIdentityInsert('questions', false);
$aQIDReplacements[$iOldQID] = $oQuestion->qid;

$newqid = $oQuestion->qid;
}

$results['questions'] = isset($results['questions']) ? $results['questions'] + 1 : 1;
$newqid = $oQuestion->qid;

if (isset($oQuestionL10n)) {
$oQuestionL10n->qid = $aQIDReplacements[$iOldQID];
Expand Down

0 comments on commit fbfebff

Please sign in to comment.