Skip to content

Commit

Permalink
Fixed issue #13280: Variables don't work in END_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Feb 2, 2018
1 parent 27e7631 commit 3045094
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/database.php
Expand Up @@ -164,7 +164,7 @@ public function _updateDefaultValues($qid, $sqid, $scale_id, $specialtype, $lang
DefaultValue::model()->updateByPk(array('sqid'=>$sqid, 'qid'=>$qid, 'specialtype'=>$specialtype, 'scale_id'=>$scale_id, 'language'=>$language), array('defaultvalue'=>$defaultvalue));
}
}
$surveyid = $iSurveyID;
$surveyid = $this->iSurveyID;
updateFieldArray();
}

Expand Down
23 changes: 11 additions & 12 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -1119,11 +1119,6 @@ private function moveSubmitIfNeeded()
$_SESSION[$this->LEMsessid]['finished'] = true;
$_SESSION[$this->LEMsessid]['sid'] = $this->iSurveyid;

if (isset($this->aSurveyInfo['autoredirect']) && $this->aSurveyInfo['autoredirect'] == "Y" && $this->aSurveyInfo['surveyls_url']) {
//Automatically redirect the page to the "url" setting for the survey
header("Location: {$this->aSurveyInfo['surveyls_url']}");
}

}

$redata['completed'] = $this->completed;
Expand All @@ -1147,18 +1142,22 @@ private function moveSubmitIfNeeded()
$this->aSurveyInfo['aCompleted']['sPluginHTML'] = implode("\n", $blocks)."\n";
$this->aSurveyInfo['aCompleted']['sSurveylsUrl'] = $this->aSurveyInfo['surveyls_url'];

$aStandardsReplacementFields = array();
if (strpos($this->aSurveyInfo['surveyls_url'], "{") !== false) {
// process string anyway so that it can be pretty-printed
$aStandardsReplacementFields = getStandardsReplacementFields($this->aSurveyInfo);
$aStandardsReplacementFields = array();
if (strpos($this->aSurveyInfo['surveyls_url'], "{") !== false) {
// process string anyway so that it can be pretty-printed
$aStandardsReplacementFields = getStandardsReplacementFields($this->aSurveyInfo);

$this->aSurveyInfo['surveyls_url'] = LimeExpressionManager::ProcessString( $this->aSurveyInfo['surveyls_url'], null, $aStandardsReplacementFields);
$this->aSurveyInfo['surveyls_url'] = LimeExpressionManager::ProcessString( $this->aSurveyInfo['surveyls_url'], null, $aStandardsReplacementFields);

}
}

$this->aSurveyInfo['aCompleted']['sSurveylsUrl'] = $this->aSurveyInfo['surveyls_url'];
$this->aSurveyInfo['aCompleted']['sSurveylsUrl'] = $this->aSurveyInfo['surveyls_url'];


if (isset($this->aSurveyInfo['autoredirect']) && $this->aSurveyInfo['autoredirect'] == "Y" && $this->aSurveyInfo['surveyls_url']) {
//Automatically redirect the page to the "url" setting for the survey
header("Location: {$this->aSurveyInfo['surveyls_url']}");
}

$this->aSurveyInfo['aLEM']['debugvalidation']['show'] = false;
if (($this->LEMdebugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY) {
Expand Down

0 comments on commit 3045094

Please sign in to comment.