The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Pass the user ID on to another php script

Pass the user ID on to another php script 1 year 4 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 1 year 4 months ago #71662

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2853
  • Thank you received: 423
  • Karma: 243
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

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 1 year 4 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 1 year 4 months ago #71757

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 751
  • Thank you received: 77
  • Karma: 33
{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 1 year 4 months ago #71785

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2853
  • Thank you received: 423
  • Karma: 243
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

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 1 year 4 months ago #71858

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 751
  • Thank you received: 77
  • Karma: 33
Correct, {QID} isn't available in 1.91+
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: DenisChenu, ITEd
Time to create page: 0.199 seconds
Donation Image