Welcome to the LimeSurvey Community Forum

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

Issue with value of "Last Page" saved value

  • scottturnbull
  • scottturnbull's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago #121690 by scottturnbull
Issue with value of "Last Page" saved value was created by scottturnbull
I am looking for a way to reset the "last page" field associated with a respondent's data record.
I am administrator for a particular survey that has a few records where the "last page" field has somehow been set to "-1".

"Response ID","Date submitted","Last page"
"16","","-1"

For the tokens associated with those records, attempts to run the survey results in a PHP error declaring "Undefined index: gid".
I believe, but have not confirmed, that the -1 value for last page is causing the survey startup to have an invalid group id set.
When reviewing all exported data records, only a few records have the -1, and all of those records exhibit the PHP error when attempting to run the survey.

I have not found a way to access that "Last page" data in any of the response editing options I've tried.

Let me provide some background information as to how I think this is getting set.

My research group is preparing to re-run a relatively lengthy survey. For invitees that took the survey previously, some seeding of initial data is desired. The method being used is to have interns use the token management system to start the survey for each invitee and set the initial data. They have been instructed to use the "previous" button to return to the beginning of the survey prior to exiting the survey, so that the invitee will start at the beginning of the survey when they accept their invitation to retake the survey.

In a small number of instances, the "Last page" information associated with a token's response record is getting saved as "-1".
It is not clear whether that "-1" is associated with exiting the survey from the "Welcome" page, or some other sequence of events is causing the "-1" to be saved as the last page reference.

We have gotten around the first scattered instances by deleting the data record (losing the work done to seed responses) and processing the token's survey, again. I would like a better solution.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #121709 by tpartner
Replied by tpartner on topic Issue with value of "Last Page" saved value
Why not put the "seeded" data in token attributes. That way it can be hidden or shown to the respondent as required and would eliminate input errors.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • scottturnbull
  • scottturnbull's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago #121711 by scottturnbull
Replied by scottturnbull on topic Issue with value of "Last Page" saved value
The use of token fields was briefly considered. The number of fields is onerous, over 1000. The move to token fields to drive the initial data display would not eliminate the need to enter the data. It also would require extensive modification of the already existing survey to set the default values for all of those fields to be keyed to the 1000+ new token fields.

The question of interest for this thread is not about seeding the data. The question is about how to recover from LimeSurvey generating corrupted data records. If a Last Page value of -1 is being saved, and it is, and the value of -1 prevents further visiting of a respondent to the survey to complete their input, then there is a problem that must be resolved.

Is there a way to reset the "Last Page" field in respondent's data record? The records are editable for those with the proper authority, but the "Last Page" field is not part of the editable record in the LimeSurvey dialog.

The installation reports running LimeSurvey 2.05+ at the bottom of the dialog screens.
The topic has been locked.
  • scottturnbull
  • scottturnbull's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #122259 by scottturnbull
Replied by scottturnbull on topic Issue with value of "Last Page" saved value
I ask, again, how can I as administrator of a survey get access to reset the Last Page field value?

This continues to be a problem that is easily repeatable.
It has nothing to do with preseeding values. It has everything to do with use of the PREVIOUS navigation button and exiting the survey from the Welcome Screen.

Here are the steps:
Create a token for the survey.
Access the survey using the token management page (The Gear Icon)
Navigate down into the survey using NEXT and then close the tab.
Reselect the Gear icon from token management.... No problem. Survey entered One Page ABOVE the last viewed page.
Now use the PREVIOUS button to navigate the survey back up to the Welcome Screen.
Close the survey tab/window.
Now reselect the Gear icon from token management and a PHP error of gid undefined will be the result.
Exporting the data record for the token in question will show the Last Page field set to -1. (one page ABOVE the Welcome Screen)

Some bit of LimeSurvey code needs to be taught it can't navigate to page "-1" when interpreting the Last Page record field.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 8 months ago #122372 by DenisChenu
Replied by DenisChenu on topic Issue with value of "Last Page" saved value
Hi,

If you have the GID error with the last version/build : this must be reported.

Else : you can test : www.limesurvey.org/en/community-services...nsions/77-fixmaxstep

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • scottturnbull
  • scottturnbull's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #122663 by scottturnbull
Replied by scottturnbull on topic Issue with value of "Last Page" saved value
As an update, I created a trivial survey consisting of a Welcome, group with two questions, and second group with one question.
Using this test case I easily generated corrupted data for a token that prevents that token from re-accessing the survey.

I submitted a bug report and attached the test case survey to it.

bugs.limesurvey.org/view.php?id=9772
The following user(s) said Thank You: first
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose