Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
16451Bug reportsSurvey takingpublic2020-07-13 12:35
Reportergabrieljenik Assigned To 
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.22.24 
Summary16451: When admin previews surveys timer is not reset in between runs
Description

When admin previews surveys timer is not reset in between runs.
This happens with active surveys as well.

Steps To Reproduce

1 - Create a 1 question survey with a 20 secs timer
2 - Preview as admin. Run.
3 - Preview as admin. The timer will not be reset

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)3.22.24
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Relationships

related to 16452 closed When admin previews surveys timer is not reset in between runs 

Activities

gabrieljenik

gabrieljenik

2020-07-02 18:08

manager   ~58661

timing-related cookies should be cleared when starting a survey

DenisChenu

DenisChenu

2020-07-03 08:48

developer   ~58672

Last edited: 2020-07-13 10:25

timing-related cookies should be cleared when starting a survey

No, else : don't use cookie , just session.

Solution : move timers to extra plugin.

gabrieljenik

gabrieljenik

2020-07-08 19:25

manager   ~58810

Last edited: 2020-07-13 10:25

On preview mode, set the 'resetQuestionTimers' js flag from server side, so timer.js can pick it and unset the localstorage (so, timer gets reset)

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1475

To compile timer.min.js we did as follows on the assets/packages/questions/timerdirectory:

npm install
npx webpack
NODE_ENV=production npx webpack

That will generate 'timer.min.js'.

user225042

2020-07-10 17:27

  ~58900

Last edited: 2020-07-13 10:25

Tested following issues by pulling the PR:

  1. Timer expiration-Page expires immediately after the set time is over and displays a message saying page expired.
  2. Timer is reset in between runs when the survey is viewed in Preview mode and in Active mode the timer does not reset.
  3. Tested Timer by Previewing and Activating the survey.
    Seems to work fine in all cases.
guest

guest

2020-07-11 09:42

viewer   ~58907

Last edited: 2020-07-13 10:25

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30274

lime_release_bot

lime_release_bot

2020-07-13 12:35

administrator   ~58913

Fixed in Release 3.22.26+200714

Related Changesets

LimeSurvey: 3.x-LTS 8d954889

2020-07-11 09:42:19

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16451: When admin previews surveys timer is not reset in between runs (#1475)

Set the 'resetQuestionTimers' js flag from server side, so timer.js can pick it and unset the localstorage
Affected Issues
16451
mod - application/controllers/survey/index.php Diff File
mod - application/helpers/frontend_helper.php Diff File
mod - assets/packages/questions/timer/src/timeclass.js Diff File
mod - assets/packages/questions/timer/timer.js Diff File
mod - assets/packages/questions/timer/timer.min.js Diff File

Issue History

Date Modified Username Field Change
2020-07-02 17:43 gabrieljenik New Issue
2020-07-02 17:43 gabrieljenik Issue cloned: 16452
2020-07-02 17:44 gabrieljenik Relationship added related to 16452
2020-07-02 18:02 gabrieljenik Description Updated
2020-07-02 18:08 gabrieljenik Note Added: 58661
2020-07-03 08:48 DenisChenu Note Added: 58672
2020-07-06 11:44 cdorin Priority none => normal
2020-07-06 11:44 cdorin Status new => confirmed
2020-07-06 11:44 cdorin Zoho Sprints => |Yes|
2020-07-06 11:44 swendrich Zoho Sprints ID => 14469000000167001
2020-07-08 19:25 gabrieljenik Note Added: 58810
2020-07-08 19:33 gabrieljenik Note Edited: 58810
2020-07-10 17:27 user225042 Note Added: 58900
2020-07-11 09:42 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 8d954889
2020-07-11 09:42 guest Note Added: 58907
2020-07-13 10:25 swendrich Zoho Sprints Yes => |Yes|
2020-07-13 10:25 swendrich Status confirmed => resolved
2020-07-13 12:35 lime_release_bot Zoho Sprints Yes => |Yes|
2020-07-13 12:35 lime_release_bot Note Added: 58913
2020-07-13 12:35 lime_release_bot Status resolved => closed
2020-07-13 12:35 lime_release_bot Resolution open => fixed