Re: mod_survey redirection-pages

Joel Palmius <[email protected]>
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
Me and BugAnt has discussed this problem at some length and concluded that 
it is not as easy as it would first seem. Problem is that each survey page 
is its own entity, containing parse-display-submit. At the time of 
displaying a page, you do not (necessarily) know which the next page is, 
and thus simply changing the action of the form tag in the html output 
won't work.

My current theoreticizing (if there is such a word) is that the following 
procedure might eventually work with some code rewiring:

(page A is conditional branching and may display either Page B or Page C 
depending on answers)

* Request for display of page A
- Parse page A (Survey::Document->new, with request object)
- Display page A (Survey::Display->new with document object)
* pause, request for submit of page A
- Parse page A (Survey::Document->new, with request object)
- Handle submit data (Survey::Submit->new with doc obj)
- Interpret submit data to find out which next page is
- Parse page B (Survey::Document->new, with artificial request object or 
explicit file name). Thus within the same request we construct a *second* 
Survey::Document.
- Display page B (Survey::Display->new with page B doc obj) instead of 
calling Survey::Submit->SubmitMsg() (one'd have to remove code in 
Survey::Submit)

To make this work, all occurances of $r->uri() ($doc->{HANDLER}->uri()) 
must be replaced to read from some other place since the uri will be 
pointing to page A during both requests.

My first hint for where one should start digging is in 
Survey::Handler->handler(). Here one could begin with trying to construct 
a document object of the next page if it was a submit request.

Other interesting places are Survey::Submit->DoRouting() and 
Survey::Submit->SubmitMsg().

I hope this helps you, because I've been thinking for some time that the 
forward-page thing should be worked away sooner rather than later. :-)

   // Joel

On Mon, 20 Sep 2004, Michael Waider wrote:

> Hello Joel,
>
> we are working with a new multipage-survey and trying to get rid
> of these redirect-pages between two survey-pages. Maybe we can
> find a way to process multipage-surveys without issuing these
> redirection-pages. Any hints about where to start on this topic
> are welcomed (e.g. Where is the content-type of the
> redirection-pages set?).
>
> thx + Cheers    Mike
>
> --
> eveca GmbH - Internet & Befragungen - http://eveca.de
> Fon: 0941/785368-0 - Fax: 0941/785368-99
> Skickat av Michael Waider <[email protected]>
> till survey-discussion
>
Skickat av Joel Palmius <[email protected]>
till survey-discussion
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.