Check out the LimeSurvey source code on GitHub!

Pass the user ID on to another php script

More
5 years 1 month ago #71630 by audiolime
Hi all,

I am trying to pass on the user ID that limesurvey generates to another php script. I managed to display the User ID in a boilerplate question using {SAVEDID}, but I don't know how to make that variable usable for another php script.

A little background information: I managed to integrate an applet called NanoGong that participants use to record themselves with. Now I need to store the files this applet is creating under meaningful names to match the files and the responses these participants gave on limesurvey.

I would greatly appreciate any advice on how this could be done!
Esther

Please Log in to join the conversation.

More
5 years 1 month ago #71662 by tpartner
1) You could try appending the {SAVEDID} as a parameter to the End URL .

2) You can use the jQuery.get() function to call a remote PHP file. Here is an example - www.limesurvey.org/en/forum/can-i-do-thi...on-of-a-survey#55975 .

3) If you need more functionality that the .get() function, see the jQuery.ajax() function - api.jquery.com/jQuery.ajax/

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 1 month ago #71750 by audiolime
Thank you very much for your advice! Do you know the placeholder for the question ID? I would like to store the files under [userID]_[questionID].wav

Please Log in to join the conversation.

More
5 years 1 month ago #71757 by TMSWhite
{QID}, which is available in 1.92 and 2.0

Please Log in to join the conversation.

More
5 years 1 month ago #71785 by tpartner
As far as I know, {QID}is not available in the current stable version. You will need to use JavaScfript to find it.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 1 month ago #71858 by TMSWhite
Correct, {QID} isn't available in 1.91+

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form