Welcome, Guest
Username: Password: Remember me

TOPIC: Pass the user ID on to another php script

Pass the user ID on to another php script 2 years 6 months ago #71630

  • audiolime
  • audiolime's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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
The administrator has disabled public write access.

Re: Pass the user ID on to another php script 2 years 6 months ago #71662

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4069
  • Thank you received: 748
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Pass the user ID on to another php script 2 years 6 months ago #71750

  • audiolime
  • audiolime's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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
The administrator has disabled public write access.

Re: Pass the user ID on to another php script 2 years 6 months ago #71757

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
{QID}, which is available in 1.92 and 2.0
The administrator has disabled public write access.

Re: Pass the user ID on to another php script 2 years 6 months ago #71785

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4069
  • Thank you received: 748
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Pass the user ID on to another php script 2 years 6 months ago #71858

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Correct, {QID} isn't available in 1.91+
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.115 seconds
Donation Image