Re: Selection of questions

Michael Waider <[email protected]>
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
On Saturday, 30. October 2004 17:54, Martin Ertl wrote:
> I remember Mike once did random selection by using a workaround
> with pre-parsed perl snippets:
>
> for example on a ROUTE-tag:
> build an array with all possible followers, then select one of
> them with rand() function and print this to CONTINUE parameter

Looked like this:

<ROUTE CONTINUE="{/
srand(time);
@route=('alt1.survey','alt2.survey','alt3.survey');
print $route[int(rand(3))];
/}" />

hth + 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
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.