Skip to content

Commit

Permalink
Fixed issue #17802: Error shown when try to load a saved survey (#2196)
Browse files Browse the repository at this point in the history
Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed Jan 11, 2022
1 parent 015c228 commit 537303c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions application/controllers/survey/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,16 @@ public function action()
LimeExpressionManager::SetDirtyFlag();
buildsurveysession($surveyid);

if (loadanswers()) {
Yii::app()->setConfig('move', 'reload');
$move = "reload"; // veyRunTimeHelper use $move in $arg
// If no name and pass are set in the request, don't try to load an answer. Just show the loading form.
if (empty(Yii::app()->request->getParam('loadname')) && empty(Yii::app()->request->getParam('loadpass'))) {
Yii::app()->setConfig('move', "loadall"); // Show loading form
} else {
$aLoadErrorMsg['matching'] = gT("There is no matching saved response.");
if (loadanswers()) {
Yii::app()->setConfig('move', 'reload');
$move = "reload"; // veyRunTimeHelper use $move in $arg
} else {
$aLoadErrorMsg['matching'] = gT("There is no matching saved response.");
}
}

randomizationGroupsAndQuestions($surveyid);
Expand Down

0 comments on commit 537303c

Please sign in to comment.