Skip to content

Commit

Permalink
Fixed issue #17802: Error shown when try to load a saved survey (#2197)
Browse files Browse the repository at this point in the history
* Fixed issue #17802: Error shown when try to load a saved survey

* Fixed issue #17802: Error shown when try to load a saved survey

- Fix style violation

* Fixed issue #17802: Error shown when try to load a saved survey

Typo

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed Jan 11, 2022
1 parent 538e070 commit 80ff774
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions application/controllers/survey/index.php
Expand Up @@ -425,11 +425,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"; // SurveyRunTimeHelper use $move in $arg
} else {
$aLoadErrorMsg['matching'] = gT("There is no matching saved response.");
}
}

randomizationGroupsAndQuestions($surveyid);
Expand Down

0 comments on commit 80ff774

Please sign in to comment.