Skip to content

Commit

Permalink
Fixed issue #06015: INSERTANS does not work in end message
Browse files Browse the repository at this point in the history
  • Loading branch information
TMSWhite committed Apr 16, 2012
1 parent 3dc5adb commit d6bc722
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
12 changes: 12 additions & 0 deletions admin/html.php
Expand Up @@ -787,6 +787,18 @@
templatereplace($surveyinfo['surveyls_welcometext']);
$surveysummary .= LimeExpressionManager::GetLastPrettyPrintExpression();

if (trim($surveyinfo['surveyls_endtext'])!='')
{
$surveysummary .= "</td></tr>\n"
. "<tr >\n"
. "<td align='right' valign='top'><strong>"
. $clang->gT("End message:")."</strong></td>\n"
. "<td align='left'>";

templatereplace($surveyinfo['surveyls_endtext']);
$surveysummary .= LimeExpressionManager::GetLastPrettyPrintExpression();
}

$surveysummary .= "</td></tr>\n"
. "<tr ><td align='right' valign='top'><strong>"
. $clang->gT("Administrator:")."</strong></td>\n"
Expand Down
13 changes: 7 additions & 6 deletions group.php
Expand Up @@ -318,10 +318,6 @@
{
$assessments = doAssessment($surveyid);
}
if($thissurvey['printanswers'] != 'Y')
{
killSession();
}

sendcacheheaders();
doHeader();
Expand All @@ -342,7 +338,8 @@
unlink('upload/tmp/'.$_SESSION['files'][$i]['filename']);
}
*/
$completed = $thissurvey['surveyls_endtext'];
// can't kill session before end message, otherwise INSERTANS doesn't work.
$completed = templatereplace($thissurvey['surveyls_endtext']);
$completed .= "<br /><strong><font size='2' color='red'>".$clang->gT("Did Not Save")."</font></strong><br /><br />\n\n";
$completed .= $clang->gT("Your survey responses have not been recorded. This survey is not yet active.")."<br /><br />\n";
if ($thissurvey['printanswers'] == 'Y')
Expand All @@ -351,6 +348,10 @@
// in other cases the session is cleared at submit time
$completed .= "<a href='{$publicurl}/index.php?sid=$surveyid&amp;move=clearall'>".$clang->gT("Clear Responses")."</a><br /><br />\n";
}
if($thissurvey['printanswers'] != 'Y')
{
killSession();
}
}
else //THE FOLLOWING DEALS WITH SUBMITTING ANSWERS AND COMPLETING AN ACTIVE SURVEY
{
Expand Down Expand Up @@ -412,7 +413,7 @@
}
else
{
$completed = $thissurvey['surveyls_endtext'];
$completed = templatereplace($thissurvey['surveyls_endtext']);
}

// Link to Print Answer Preview **********
Expand Down

1 comment on commit d6bc722

@TMSWhite
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ported to Yii

Please sign in to comment.