Welcome, Guest
Username: Password: Remember me

TOPIC: passthrough in EM

passthrough in EM 1 year 10 months ago #85221

  • arjen
  • arjen's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Is it possible to use passthrough variables in Expression Manager?

For a scientific experiment I need some functionality that cannot be delivered by LS AFAIK. I need to make a survey that shows different questions per user, with 12 variations. After each variation has been answered by 20 users, another 8 variations are added. The survey is sent to a large group of users, but we are not sure which part of them will respond.

The current idea is to put a small php script in front of LS that sends users to LS with a passthrough variable. That variable has to be used to determine the variation of questions this particular user will get. After the survey is completed, LS sends the passthrough variable back to the php script which counts the successful completions. After the fist 12 variations have been filled up, the php script will send the users to the next 8 variations.

-Arjen
The administrator has disabled public write access.

Re: passthrough in EM 1 year 10 months ago #85299

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Yes.

Say you have 4 variables you want to pass through, q1, q2, q3, and q4. You would add a group to the beginning of the survey containing just those 4 variables. Each should be an Equation question, and the advanced question option "always hide" should be true.

Then, you can pass data like this:

http://yoursite/limesurvey/index.php?sid=12345&q1=AAA&q2=BBB&q3=CCC&q4=DDD, where AAA-DDD are the desired values.

Using that approach, the pass through variables will populate the q1-q4 variables and will be stored in the database.
The administrator has disabled public write access.

Re: passthrough in EM 1 year 10 months ago #85300

  • arjen
  • arjen's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
thank you for your reply, I did some research on the hidden questions method:

  • In a strict sense it the hidden questions are not the same as a 'passthrough' variable
  • In older versions (<1.92) of LS you'll need to use the SGQA identifier
  • using 'always hide' in the advanced section of a question is broken at the moment (in the demo site 1.92+). I had to modify the css in the template to hide the question

-Arjen
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.117 seconds
Donation Image