Menu

#12 Show Response Number in Thank You

open-accepted
None
5
2009-03-23
2006-03-29
Alex
No

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

Discussion

  • Franky Van Liedekerke

    • assigned_to: nobody --> liedekef
    • status: open --> open-accepted
     
  • Franky Van Liedekerke

    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

     

Log in to post a comment.