I am trying to create a survey in which different participants must log in with their accounts several times over the period of 1 month and answer the same questions.
My problem is, when I hand passwords out and the participants log in, all answers are overriden.
To solve this I need access to the response database/participants database, so I am able to make my own access control via Javascript while making the survey anonymous (thus no answers are overriden).
What are the php parameters for accessing the token and the already filled answers?
Right now I am trying to get the data via
thanks for the fast reply.
That is true, token is possible, but I still need to access the database because I need to count how often a participant already finished the survey and compare it to a [maximum times of participation value].
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Because the "Uses left" attribute will diminish by 1, even if the survey was not completed (afaik) and the participants will only be able to finish the survey when both conditions are met:
1. Last time filled out >= 24 hours (first thing to pass through database).
2. "Uses left" >= 0
If first condition is checked "Uses left" will dimish even if it is less than 24 hours.
Uses left is decremented only when survey is submitted.
But here, i think you can use
www.limesurvey.org/manual/BeforeSurveyPage
and
- reload the good survey (reload the survey started this day but not completed)
- Throw an error is the last time is completed is less than one day.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
You were right, uses left is decremented only when survey is submitted.
With the combination of "Uses left"
"Allow multiple responses or update responses with one token?" = True
and "Enable token-based response persistence:" = False
I can allow them several times to answer the survey.
But I dont see in you PHP example the command for [last time filled out], he only fixes the maxstep/uses left (which is not a problem in my case) with on the BeforeSurveyPage.
I just need the name of the [last time filled out] parameter to work with via PHP.