Re: 2 Urgent (challenging) Questions? saving mulitpage data & generating own srvkey

Joel Palmius <[email protected]> Sun, 15 Jan 2006 10:51:29 +0100 (CET)
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
For question 1, what you can do is allow user to temporarily save and then 
return. However, if the user does not return, then the data will not be 
saved. In practise, there is currently no way to save partial data when a 
user decides to simply quit.

What you could do is break up the survey chain into several smaller parts 
and join them on some id later. It is possible to set and read a cookie 
through perl snippets.

Another alternative is to include a question in the bottom of each page 
saying "I'm bored, let me give up now", and route the user to the last 
page if he checked that.

As a parenthesis, allowing broken answers would lead to some logical 
problems with MUSTANSWER questions not being answered and so on. These 
could probably be solved, but I haven't thought a whole lot about it.

For question two, no, you can't *replace* the key. You can include your 
own IDs from the url string, but they'd be included as separate variables. 
This can be done with a perl snippet (there is some example in the list 
archive), but in practise I think you want the new TOKENAUTH 
authentication method, which will do all this automatically for you. 
TOKENAUTH is available in the development branch and in stable releases 
from 3.2.3-pre2 and onwards. Documentation is temporarily available in a 
subversion repository at:

https://svn.jwp.se:8443/svn/mod_survey/documentation/trunk/docbook-sources/pdf/

(login as user "svn" with password "svn"). This repository will be moved 
sooner or later, as mod_survey is about to move to another server.

   // Joel


On Sat, 14 Jan 2006, Louis wrote:

> Hi
>
> Question 1:
> Is it possible to record all the answers that a respondent answered even if
> he/she quits in the middle?  I know that you can use a database as a backend,
> but this is the resource that I have access to. Like, what I want is to be able
> to get partially filled out answers.  So for long mulipage surveys, you can
> still get some data out of the partially filled survey.
>
> (Scenario)
> You have 100 survey pages, users quits on the 99th page.  You won't get the
> data.  So, is it possible that I can still get the partial data everytime the
> respondant clicks on submit button from survey page 1 to 99? possibly through
> perl snippet codes if necessary.
>
>
> Question 2:
> Is it possible that I create my own survey key (srvkey) and use that as the user
> id.  For instance, being able to do something with the url:
> http://someaddress.com/thesurvey.survey?action=display&uid=1
> http://someaddress.com/thesurvey.survey?action=display&uid=2
> ...
> http://someaddress.com/thesurvey.survey?action=display&uid=somelargefinitenumber
>
>
> where I'll keep track of:
> uid=1 is Person A
> uid=2 is Person B
> uid=3 is Person C
>
> So, that we'll know which respondant has answered the survey and not.
>
> And when retriving the data in text format, I can have something like:
> srvkey q1      q2
> 1      dataq1  dataq2
>
> Instead of the server generating the timestamp as the unique srvkey.  And if the
> same key is used, we'll not permit them to submit his answers again.
>
>
> Any help would be appreciated.
>
> Thanks,
> Louis
>
>
> Skickat av Louis <[email protected]>
> till survey-discussion
>
Skickat av Joel Palmius <[email protected]>
till survey-discussion