Mark participant as 'Speedster'

More
4 years 5 months ago #143717 by Zirys
I know that it is possible to let Limesurvey measure the time a participant needs for each question.
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
The topic has been locked.
LimeSurvey Partners
More
4 years 5 months ago #143723 by Zirys
I don't know how to edit my post.

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?
The topic has been locked.
More
4 years 5 months ago - 4 years 5 months ago #143731 by holch
I don't think that the times saved in the database can be accessed by EM or any other way than directly in the database.

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.
Last edit: 4 years 5 months ago by holch.
The following user(s) said Thank You: tpartner
The topic has been locked.
More
4 years 5 months ago #143758 by tpartner
Yes, you cannot access current respondent or previous respondent timings from within the survey so Holch's approach is probably the easiest.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The topic has been locked.
More
4 years 5 months ago - 4 years 5 months ago #143770 by Zirys
Thanks for your reply.

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?
Last edit: 4 years 5 months ago by Zirys.
The topic has been locked.
More
4 years 5 months ago #143772 by holch
time() should give you the current UNIX time stamp, which is seconds since 1/1/1970.

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.
The topic has been locked.
More
4 years 5 months ago #143773 by holch
time() should give you the current UNIX time stamp, which is seconds since 1/1/1970.

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.
The topic has been locked.
More
4 years 5 months ago #143774 by holch
And of course al this only will work if the two questions are on different pages...

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
More
4 years 5 months ago #143803 by Zirys
Thanks for your answers.
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.
The topic has been locked.
More
4 years 4 months ago #144940 by Zirys
I have to come back to this issue.
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.
The topic has been locked.
More
4 years 4 months ago #144944 by tpartner
There should be a difference between TimeE and the LimeSurvey timestamp. TimeE is recorded when the last group loads, the LS timestamp is recorded when the last group is submitted.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The topic has been locked.
More
4 years 4 months ago #144946 by Zirys
I took this into account. However, the difference still seems to be too big to be true
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now