Welcome to the LimeSurvey Community Forum

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

Question with timer is skipped when user clears the survey and starts over.

  • Adorrgar_46504
  • Adorrgar_46504's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
9 years 10 months ago - 9 years 10 months ago #121393 by Adorrgar_46504
I have a question with a timer set to automatically redirect the user to the next question and the first time when I get to that question the timer waits for the set amount of time, however it seems that there is a bug when I hit "Exit and clear survey" and when I get to the timer question again, instead of waiting for the set time it automatically redirects me to the next question. The problem seems to be with a cookie called "limesurvey_timers" which needs to be cleared in order for the timer to reset. Is there an option that I have missed? Or is there a way to simply not add that cookie?
Last edit: 9 years 10 months ago by Adorrgar_46504.
The topic has been locked.
More
9 years 8 months ago #122926 by Racuch
I have the same problem. It's more evident since my survey is quite long and respondents often only take a peek at it and "clear" the survey to return later, but then that damned cookie is already there and skips a few questions. Is there a way to change the behaviour of the {CLEARALL} button so that cookie is eradicated?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
9 years 8 months ago #122971 by DenisChenu
Hi,

It's the attended behaviour : if the user have 3 seconds to answer, it's too easy to redo the survey to have 6 or 9 or 12 seoncds.

But you can clear the cookie in www.limesurvey.org/manual/BeforeSurveyPage event.
Test : session is set for survey ( indpiration here git.framasoft.org/SondagePro-LimeSurvey-...r/fixMaxStep.php#L40 but with srid, not token). If not set : reset the cookie.

It can be interesting for other user to put this plugin in our extension repo.

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.
The topic has been locked.
More
9 years 8 months ago #123281 by Racuch
Thank you for your explanation. In my survey restarting can hurt only the participant though, since a few first questions are always the same "warm up" ones, and the others are presented randomly, and they are quite numerous.

I cleared the cookie by using another workaround, by uploading this jQuery plugin in the template directory:
plugins.jquery.com/cookie/
Then including it in the startpage.pstpl
Code:
{TEMPLATEJS}
 <script type="text/javascript" src="{TEMPLATEURL}jquery.cookie.js"></script>

And I cleared the cookie by inserting this code in a introductory "Text Display" question
Code:
<script type="text/javascript" charset="utf-8">
 
$(document).ready(function(){
   if (typeof $.cookie('limesurvey_timers') === 'undefined'){ 
   } else {
     $.cookie('limesurvey_timers', null, { path: '/' });
   }
});
 
</script>
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose