- Posts: 22
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Mark participant as 'Speedster'
- Zirys
- Topic Author
- Offline
- Junior Member
Is it possible to implement that each participant that takes less than a pre-defined time is labeled as a 'speedster' and this label then gets passed through to the End URL?
If yes, is it also possible to make the pre-defined time a function of the median time the previous 20 respondents took for answering the questions?
I would be happy if someone could point me in the right direction or give me some hints on how to solve this.
Cheers,
Zirys
- Zirys
- Topic Author
- Offline
- Junior Member
- Posts: 22
- Thank you received: 0
Another way to ask this question woud be: How (under what name) does Limesurvey store the time for each question or the whole survey?
If I know the name, can I refer to it at the end of the survey and see if it is above a certain threshold?
If yes, I append a label to the end URL based on this test.
Is that possible?
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11645
- Thank you received: 2739
Maybe some work around: Create a hidden question at the beginning and the end where you write the time stamp in and then at the end use an expression to check the difference between the two timestamps and calculate if speedster or not.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10104
- Thank you received: 3593
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- Zirys
- Topic Author
- Offline
- Junior Member
- Posts: 22
- Thank you received: 0
Could you give me a short hint how I can access the timestamp.
I am trying to understand time(), which gives me several digits I do not understand how they relate to the current time. Also, I do not really understand strtotime().
If I create an equation question named "timeS" at the start of question goup1, one equation question named "timeE" at start of the next question group. In both I include {time()}. Then I create an equation question in question group 3, consisting of {timeE - timeA}, it does not seem to give me the duration in seconds.
Btw I also tried the long workaround with JavaScript you suggested in another thread. If I store the JavaScript in a question named 'timesafe' and try to check whether it works in another question called 'showtime' (of equation type), only including {timesafe}, it won't show me any elapsed time. So I am unsure whether it works with the JavaScript.
What am I doing wrong?
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11645
- Thank you received: 2739
What is the unix time stamp?
The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970 at UTC. Therefore, the unix time stamp is merely the number of seconds between a particular date and the Unix Epoch. It should also be pointed out (thanks to the comments from visitors to this site) that this point in time technically does not change no matter where you are located on the globe. This is very useful to computer systems for tracking and sorting dated information in dynamic and distributed applications both online and client side.
So if you subtract the time at beginning from the time at the end you should have the difference in seconds.
What can happen is that once you use these equation questions, the time stamp is triggered again. I haven't figured out this behaviour yet, maybe Tpartner knows more about this.
So you might want to check in each of the time equations wether it has been fired already with something like "is_empty" and only if empty you write the time stamp in.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11645
- Thank you received: 2739
What is the unix time stamp?
The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970 at UTC. Therefore, the unix time stamp is merely the number of seconds between a particular date and the Unix Epoch. It should also be pointed out (thanks to the comments from visitors to this site) that this point in time technically does not change no matter where you are located on the globe. This is very useful to computer systems for tracking and sorting dated information in dynamic and distributed applications both online and client side.
So if you subtract the time at beginning from the time at the end you should have the difference in seconds.
What can happen is that once you use these equation questions, the time stamp is triggered again. I haven't figured out this behaviour yet, maybe Tpartner knows more about this.
So you might want to check in each of the time equations wether it has been fired already with something like "is_empty" and only if empty you write the time stamp in.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11645
- Thank you received: 2739
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- Zirys
- Topic Author
- Offline
- Junior Member
- Posts: 22
- Thank you received: 0
I seem to have solved my original problem, although I am not yet quite sure whether the time measurement with the "time()" solution instead of the Javascript solution is correct.
In case anyone is interested or has the same problem: My original goal was to measure the time a participant took to take the whole questionnaire, then evaluate whether he was faster than a certain amount of seconds, then label those that were faster as speedsters.
I created an equation question in group 1, measuring the UNIX time with time(). I did the same in the last group. It follows an equation question that measures the time difference, evaluating whether the difference is bigger than a pre-given amount. IF yes, the respecitive variable is set to nospeedster.
Since I additionally have Quota, I also need to make sure that participants that are screened out do not count towards the quota. Therefore, I used a solution that was provided here (unfortunately in German: www.limesurvey.org/de/foren/german-forum...-quote-setzen#143646 ). I created a hidden question with two answer options. This was set to nospeedster if the above statement was true. I then changed all my quotas so that they also had to fulfill "nospeedster = TRUE" to be triggered.
Hope that helps some people with the same challenges.
Thanks.
- Zirys
- Topic Author
- Offline
- Junior Member
- Posts: 22
- Thank you received: 0
I looked again at the time differences measured by having a equation variable TimeS with {time()} and a equation variable TimeE with {time()}, whereas the former is located at the start of the questionnaire, and the latter at the end. Both are in different question ccategories.
I calculated the time differences resulting from these substractions of UNIX timestampes, and the time differences that are provided by Limesurvey at the end of each study per participant.
The Unix time stamp appears to be on average 21 seconds lower than the "actual" time stamp.
Does anyone know why that is?
This matters for me because I need the time stamp in order to label participants as speeders. For this, I cannot access the "actual" time stamps provided by Limesurvey at the end. Just "adjusting" these times based on the mean 21 seconds seems too risky for me.
Would be happy about hints.
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10104
- Thank you received: 3593
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- Zirys
- Topic Author
- Offline
- Junior Member
- Posts: 22
- Thank you received: 0