From b8b2a38ef5133ad7fe06fcbe192d0fa4616c2c4c Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 4 Feb 2009 02:22:21 +0000 Subject: [PATCH] Fix the exitURL redirection when a survey is completed and the site uses a gateway url. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/Survey.pm | 7 +++++-- lib/WebGUI/i18n/English/Asset_Survey.pm | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d8ce8fa4f..49b65240c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -16,6 +16,7 @@ - fixed #9535: Bad characters in dom element ids when generated from assetId - fixed #9542: Default WebGUI config contains invalid workflow activity - fixed #9623: preload.custom paths not included during upgrade + - fixed #9638: Survey - Submit of survey creates new demo 7.6.10 - fixed #9577: WebGUI::Form::Url::getValue returns blank rather than undef for blank fields diff --git a/lib/WebGUI/Asset/Wobject/Survey.pm b/lib/WebGUI/Asset/Wobject/Survey.pm index 647e5deb2..4248fad05 100644 --- a/lib/WebGUI/Asset/Wobject/Survey.pm +++ b/lib/WebGUI/Asset/Wobject/Survey.pm @@ -997,9 +997,12 @@ sub surveyEnd { $url = "/"; } } + $url = $self->session->url->gateway($url); - # $self->session->http->setRedirect($url); - return to_json( { "type", "forward", "url", $url } ); + #$self->session->http->setRedirect($url); + #$self->session->http->setMimeType('application/json'); + my $json = to_json( { "type", "forward", "url", $url } ); + return $json; } ## end sub surveyEnd #------------------------------------------------------------------- diff --git a/lib/WebGUI/i18n/English/Asset_Survey.pm b/lib/WebGUI/i18n/English/Asset_Survey.pm index 231a477f3..337048dd2 100644 --- a/lib/WebGUI/i18n/English/Asset_Survey.pm +++ b/lib/WebGUI/i18n/English/Asset_Survey.pm @@ -493,8 +493,8 @@ our $I18N = { }, 'Survey Exit URL help' => { - message => q|When the user finishes the surevey, they will be sent to this URL. Leave blank if no special forwarding is required.|, - lastUpdated => 0, + message => q|When the user finishes the surevey, they will be sent to this URL. Leave blank if no special forwarding is required. The gateway setting from the config file will be automatically added to the URL for you.|, + lastUpdated => 1233714385, }, 'percentage label' => {