Reset timers cookie on last page

More
2 months 3 weeks ago - 2 months 3 weeks ago #170625 by Matiasko
Matiasko created the topic: Reset timers cookie on last page
Hello,

we're about to run a survey for our research.

The most important part is that we use timers for some of the questions (16 of them). After the survey is completed we expect people to run it again on the same device but as timer values are stored in cookies, they will not have starting value like 30 seconds but the remaining time from the previous session. In worse case scenario the question will be skipped because in the first session the timer has run down to 0.

This is why I would like to reset timers-related cookies. I have checked the site cookies but none of them looks to me like it is storing these times. Yet at the same time, when I reset all site cookies, the timers get reset so this information must be stored somewhere there.

Additional info: we can't ask them to run it in the incognito tab or to delete their cookies. We expect participant to use all types of devices, be it computer or smartphone.

Could you explain to me how exactly are timer values stored in cookies?

Best, could you provide me with the code (JavaScript?) to use at the end of the survey that will clear only timers-related cookies?

Version: 3.13.0

Thank you
Matt
Last Edit: 2 months 3 weeks ago by Matiasko.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170629 by tpartner
tpartner replied the topic: Reset timers cookie on last page
If you append a parameter "newtest=Y" to the survey URL the session and timers should be reset.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170631 by Matiasko
Matiasko replied the topic: Reset timers cookie on last page
Thank you for your answer but it doesn't reset timers :(

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170632 by dominikvitt
dominikvitt replied the topic: Reset timers cookie on last page
Yes, I also confirm that appening "newtest=Y" parameter doesn't resets the timers.
I'll have a look now and try to fix it.
The following user(s) said Thank You: tpartner, LouisGac

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170636 by DenisChenu
DenisChenu replied the topic: Reset timers cookie on last page

dominikvitt wrote: Yes, I also confirm that appening "newtest=Y" parameter doesn't resets the timers.
I'll have a look now and try to fix it.

No, please : it's the needed behaviour …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170638 by tpartner
tpartner replied the topic: Reset timers cookie on last page
Why? A new session is, well, a new session. No?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago - 2 months 3 weeks ago #170639 by DenisChenu
DenisChenu replied the topic: Reset timers cookie on last page

tpartner wrote: Why? A new session is, well, a new session. No?

If you set a timer : you want the user answer in this time, if he allowed to start and start again : remove this feature …

I see only one time in action : it's done for a quizz, where user can have point at end. The : if user can start, go just before submit, and send again with just a newtest=Y …

PS : i'm sure we have some old issue's about this feature

PS2! It's timer cookies, not timer session

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 2 months 3 weeks ago by DenisChenu.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170640 by tpartner
tpartner replied the topic: Reset timers cookie on last page
I don't care whether it's controlled by session or cookies. In my opinion it should be reset when the session is. If you don't want them to restart, don't include the newtest param. It's not like it's respondent-proof now if resetting cookies resets the timer.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago - 2 months 3 weeks ago #170642 by DenisChenu
DenisChenu replied the topic: Reset timers cookie on last page
The issue is : it's like this since implementation.
We already update some part : bugs.limesurvey.org/view.php?id=5370#c15916

But if a user have this in implementation : you can add a settings to disable it, but you can't just disable it in every survey …
See with @jcleeland : he implements the timer feature, and surely/maybe need it in cooàkies not in session …

You ask to don't update HTML in 3.X, then why update a behaviour of question settings (same since 1.91 or before …)

See:
bugs.limesurvey.org/view.php?id=6420#c20118

The cookie setting is meant to be fixed and unchangeable - so that the timer really does lock people out of a question once the time has expired.


PS : my general isea about timer : bugs.limesurvey.org/view.php?id=8750 is "move out from core with current implementation", after : more timer plugins can come. Some with newtest reset, some without, some only in session, some by tokens (i think it's the major part here : in session + saved in DB) etc …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 2 months 3 weeks ago by DenisChenu.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170643 by tpartner
tpartner replied the topic: Reset timers cookie on last page
I didn't think that was the behaviour and I still don't agree with it.

Do whatever you want.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170645 by DenisChenu
DenisChenu replied the topic: Reset timers cookie on last page

tpartner wrote: I didn't think that was the behaviour …

It was the behaviour since 1.91… i can guarantee …
I make a js hack for this in 1.92, not so difficult …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170649 by Matiasko
Matiasko replied the topic: Reset timers cookie on last page
Guys, I'm happy that you have this discussion :) I do agree not to reset it with reloading as we don't want it in our survey. It asks questions with limited time answers so participants don't have time to check answers on the internet (not a quiz though, we don't score the whole thing, just small part). So tbh for me, it would be the best to reset cookies on the end page of the survey or at the welcome screen (but you would need to exclude brand new participants).

I would love to reset cookies with some kind of JS on the last page but as I mentioned, I don't really get which cookie it is and wouldn't like to reset all of them (not to break something).

Anyway I look forward to your answers and discussion :)

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #170650 by DenisChenu
DenisChenu replied the topic: Reset timers cookie on last page
In 3.11 : the timer was resetted each time page is shown … move next set the delay to max again.

I think it's an issue (bit don't really care too)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 months 1 day ago - 2 months 1 day ago #171567 by PauloReis
PauloReis replied the topic: Reset timers cookie on last page
Hello Matiasko,

I don't know if this solve your problem but solved mine. I did a survey with time limit option enable and after reload the survey at the same computer the timers are not reset. After some search I found this solution.

<script type="text/javascript" charset="utf-8">
  // clear limesurvey_timers_time_question_XXX for all questions
  localStorage.clear();
</script>

I put the code in the first question. Works great for me! :)


I use LimeSurvey Version 3.13.2.


Cheers,
Paulo Reis
Last Edit: 2 months 1 day ago by PauloReis.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!