Permalink
Browse files

Fixed issue #6837: Unable to use {QCode} or {INSERTANS:SGQA} in end url

  • Loading branch information...
1 parent 7fcd136 commit 92735ff36c36e13eac7f27dc2b8fa9a5d6e04645 @c-schmitz c-schmitz committed Nov 9, 2012
Showing with 7 additions and 11 deletions.
  1. +7 −11 application/helpers/SurveyRuntimeHelper.php
@@ -393,10 +393,7 @@ function run($surveyid,$args) {
// in other cases the session is cleared at submit time
$completed .= "<a href='" . Yii::app()->getController()->createUrl("survey/index/sid/{$surveyid}/move/clearall") . "'>" . $clang->gT("Clear Responses") . "</a><br /><br />\n";
}
- if ($thissurvey['printanswers'] != 'Y')
- {
- killSurveySession($surveyid);
- }
+
}
else //THE FOLLOWING DEALS WITH SUBMITTING ANSWERS AND COMPLETING AN ACTIVE SURVEY
@@ -494,13 +491,6 @@ function run($surveyid,$args) {
header("Location: {$thissurvey['surveyls_url']}");
}
-
- //if($thissurvey['printanswers'] != 'Y' && $thissurvey['usecookie'] != 'Y' && $tokensexist !=1)
- if ($thissurvey['printanswers'] != 'Y')
- {
- killSurveySession($surveyid);
- }
-
doHeader();
echo $content;
}
@@ -517,6 +507,12 @@ function run($surveyid,$args) {
}
echo templatereplace(file_get_contents($sTemplatePath."endpage.pstpl"));
doFooter();
+
+ // The session cannot be killed until the page is completely rendered
+ if ($thissurvey['printanswers'] != 'Y')
+ {
+ killSurveySession($surveyid);
+ }
exit;
}
}

0 comments on commit 92735ff

Please sign in to comment.