Welcome to the LimeSurvey Community Forum

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

Time limit for question groups or whole survey

  • Siem
  • Siem's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 1 week ago - 6 years 1 week ago #167017 by Siem
I would like to have visible time-limit for a whole survey (or a questiongroup if that is the work-around).
The participants have to answer as much questions as they can in a given time.

I found an older discussion from 2015 about this, but unfortunately the solution, pasting the following in a time limited question didn't do it for me:
Code:
<script>
$(function() {
    $("#question{QID} input").hide();
});
</script>


Perhaps some things have changed in the newer version of LimeSurvey or I could be doing it wrong, any idea what I can do to make it work?
Last edit: 6 years 1 week ago by Siem.
The topic has been locked.
More
6 years 1 week ago #167046 by jelo
The complete workaround in the mentioned thread was this:

- Add a time limited question (short text for example)
- Set 'go next' for action
- Hide this question in javascript $("#question{QID}").hide()

Then the time limit happen for the group, when the time limit come for question, he go to the next group.



So you might first post what version of LimeSurvey you're using now and explain what you want to do.
The workaround should work without hiding the question first. If that is the case, you can hide the question. Best way to hide depends on the version of LimeSurvey used. Perhaps there is already a bug in the timer question in your version as well.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • Siem
  • Siem's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 1 week ago #167077 by Siem
Many thanks for your reply.

We are using version 2.73.1+171220.

We did the following steps: created a new question and moved it to the first question in the group. The question type is "short free text". And a timer was set with the option "move on without warning" enabled. The javascript was added to the source of the question.

The survey type is "question by question", could this be a problem? When I start the survey the question is visible, it shows the timer and when the timer expires it will go to the next question.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 week ago #167091 by tpartner
Replied by tpartner on topic Time limit for question groups or whole survey
As stated in the linked workaround, the survey must be in group-by-group mode.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Siem
  • Siem's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 1 week ago #167097 by Siem
Thanks it works now and it looks like this, is that correct or should the javascript be hiding the question containing the timer?



What would be the way to move the timer to the top so it stays there, when participants scroll down?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 week ago #167146 by tpartner
Replied by tpartner on topic Time limit for question groups or whole survey
The script is only supposed to hide the question text input.

You will need to use JavaScript or CSS to fix the question at the top. Details would depend on the template use.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose