In one of our surveys respondents are allowed to come
back and see how their response is evaluated in context
to the other results. For this we show the response id
in the text of the thank you body.
In the thank_body text the string %rid% is replaced by
the response number.
This is achieved with the following modifications:
*) FILE: admin/include/funcs.inc
change
function goto_thankyou($sid,$referer) {
to
function goto_thankyou($sid,$referer,$rid) {
add
$thank_body = preg_replace("/%rid%/", $rid,
$thank_body);
right after
if(empty($thank_body) && empty($thank_head)) {
$thank_body =
$GLOBALS['ESPCONFIG']['thank_body'];
$thank_head =
$GLOBALS['ESPCONFIG']['thank_head'];
}
*) FILE: public/handler.php
change goto_thankyou($sid,$HTTP_POST_VARS['referer']);
to
goto_thankyou($sid,$HTTP_POST_VARS['referer'],
$HTTP_POST_VARS['rid']);
PS: my code is based on phpESP 1.7.5
PPS: sorry for not providing a proper patch file
This will be included in the next version, since it doesn't interfere with anything else (I just forgot to include it so far)
Franky