Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Set cookie in a survey that has tokens table

  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 11 months ago - 4 years 11 months ago #183222 by yohay
Hi,
I need to set a cookie to prevent repeated participation from the same machine and I see that if I have participation table it doesn't work.
Is it the standard behavior or is it a bug ? Is there away to use it with a survey that has a tokens table?

Thank you in advance
Last edit: 4 years 11 months ago by yohay.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 11 months ago - 4 years 11 months ago #183227 by Joffm

it doesn't work.


What doesn't work?
The cookie is not set?
The survey does not start?
Or what?


I tested and it looks fine.

Joffm

But if you use tokens the participant can use it only once (in the default setting)
So what is the special reason to avoid the survey to be answered twice from the same machine.
(E.g. you invited two people of the same household. The have different tokens)

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 11 months ago by Joffm.
The topic has been locked.
  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 11 months ago - 4 years 11 months ago #183228 by yohay
The cookie is not set. User can access the survey from the same machine over and over.
BUT I didnt mention something that might be the problem.
Every user has more than one "uses left".
The idea is that there is a group of responses on the same token and I want to restrict the use to only one machine (but can be completed more times under different machines)
Last edit: 4 years 11 months ago by yohay.
The topic has been locked.
  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 11 months ago #183235 by yohay
I've just notice your PS question..
The reason is because of the following scenario:
- Course evaluation survey that is taken by different classes
- Survey participants need to be annonymos but they identify by their class id
- They're all taking it at the same time at the same computer lab
- The identification is done by an api taking a unique number from the attributes table (that's why only one record per class)

Thus I need:
- That every participant will be able to fill the survey only once (that's why the cookie)
The topic has been locked.
  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 11 months ago #183368 by yohay
Hi
just updating that I've solved it by creating cookie handling in JS that I've added at the start and end page
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose