Please help us help you and fill where relevant:
Your LimeSurvey version: [url=http://localhost/lsinicia/evaluacion/index.php?r=surveyAdministration/view&iSurveyID=976812#modalSystemInformation]6.11.0+250303 [/url]
Own server or LimeSurvey hosting: Own server
Survey theme/template: Bootswatch / extended theme
==================
Hello everyone,
I'm having a problem with the survey index using token based response persistence and want to move a fix we have in the code to a plugin, as background info our surveys are group by group where each group has one question, we also use a full index that's always visible to the participants, so we experience a problem when the user does the following:
At question 30 they answer and then go back to question 10 and close the survey, after the participant re-enters there's no info on any index item after question 10 leaving them as unanswered, this behavior is seen in both the default template and our own.
Our fix for this goes directly in the source code and gets if the question is answered through a query and then builds the array caring only about if the question was answered or not, replacing the code in the file. Now I have been doing research on this problem and found the plugin fixMaxStep this plugin is quite old, and I'm not sure if it would work nowadays even if updated. From looking at the code from questionIndexHelper specifically getIndexItemsGroups:
The problem seems to happen in here, this array contains only the data until the view/question the user has visited/moved like with jumpTo()
$stepInfos = LimeExpressionManager::GetStepIndexInfo();
For the plugin, I tried accessing aSurveyInfo and replace aQuestionIndex during beforeSurveyPage, but I couldn't do that. Another way I tried was piggybacking out of some data that goes to the template trying other hooks so I could append my array, and then add some logic in the twig using that array instead of the default one, but I couldn't find any accessible data from plugin to template, finally I have been checking ExpressionManagerStart that says it allows me to create a function and also can be accessed from the template using {{ processString("{getCompleteIndexItemsGroups('type')}") }} I have this inside the layout_global.twig and have no progress getting a simple debug response back from that call.
It would be immensely helpful if anyone has insight on this problem and how they overcame it, any recommendations on which one of those paths is viable is really appreciated.
Thanks,
Martín