View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
08408Bug reportsOtherpublic2014-03-02 22:29
Reporterphilg Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionunable to reproduce 
Product Version2.05 RC 
Summary08408: reponse can't be update
Description

i'm wok with last commit version of lime survet on the 2.05 branch
user can register a reponse of the survey the first time after can't update theirs reponses after ( with partial register response )

TagsNo tags attached.
Attached Files
Bug heat12
Complete LimeSurvey version number (& build)743be4fa317d618c7e9d98a5d3e5
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql
Server OS (if known)Linux Debian
Webserver software & version (if known)apache
PHP VersionPHP 5.3.3-7+squeeze8

Relationships

related to 08122 closedc_schmitz When Question index/allow jumping is set to full users get kicked out of the survey 

Users monitoring this issue

finnnns, philg

Activities

philg

philg

2013-11-26 10:39

reporter   ~27404

Some precision for this bug.
the problem is the saving operation of reponses when use navigation index.
The first time, reponses are save but after that they are not save anymore.
I put a new version off lss file.
To repeat the bug, start the survey, you are on the first item. put a value on the field, clic on the next button. Your answer are save.
clic on the navigation link to go to the first item of the navigation,, change your response and clic to the next button. the reponse are not save

sammousa

sammousa

2013-11-26 15:34

reporter   ~27409

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13513

sammousa

sammousa

2013-11-26 16:17

reporter   ~27410

I've set it up so that it does save values on the page. If they are not valid it will not save them.

At the moment this means that if you change a value there is no way to undo that change, if you navigate using the index it is saved; if you navigate using the next button it is saved.

philg

philg

2013-11-26 18:26

reporter   ~27412

hi i've pull the last version with the fixe (de20493149ee0f309abd22a00657aeac7650ec6e) and test it. The result are the same.
If i put an other value on the field, it's not saved if i navigate with the index or if i click on the next or previous button

philg

philg

2013-11-27 13:51

reporter   ~27423

To resolve the problem i've done two things :
In the file application/helpers/SurveyRunTimeHelper.php :
line 339, i have replace :
$moveResult = LimeExpressionManager::NavigateForwards();
by
$next = (int) $_SESSION[$LEMsessid]['step']+1;
$moveResult = LimeExpressionManager::JumpTo($next, false, true, true);

And in the file application/helpers/expressions/em_manager_helper.php
i had in the line 5194 this line :
$LEM->bProcessPost=$processPOST;

With this modifications, the group's tab reponses are save when i click on a item of the navigation and when i click on the next button.

finnnns

finnnns

2013-12-11 14:41

reporter   ~27547

Do you have positive results with your described solution?

the 5194 line in application/helpers/expressions/em_manager_helper.php

does this result in the code as follow:

static function JumpTo($seq,$preview=false,$processPOST=true,$force=false,$changeLang=false) {
$now = microtime(true);
$LEM =& LimeExpressionManager::singleton();
$LEM->bProcessPost=$processPOST;
if(!$preview)
$preview=$LEM->sPreviewMode;
if(!$processPOST || $preview)
$LEM->bProcessPost=false;

?

It would be great to explain more precisely where to put $LEM->bProcessPost=$processPOST; the replacement instruction for SurveyRunTimeHelper.php is clear enough though.

Thanks!

finnnns

finnnns

2013-12-12 16:59

reporter   ~27555

@sammousa

Seems that philg's remarks did help the issue. The code should be inserted as interpreted by me.

It's maybe worth looking at, since the erraneous behaviour could be reproduced in 131209.

finnnns

finnnns

2013-12-17 09:24

reporter   ~27573

Reminder sent to: sammousa

Please pardon me sammousa I don't mean to be rude in (re) pointing your attention to this issue.

Many greetings

Luca

sammousa

sammousa

2013-12-17 10:06

reporter   ~27574

For me this works when i try it with your supplied survey.
Steps:

  1. Import the survey.
  2. Activate the survey.
  3. Start the survey.
  4. First question, enter 3, click on the question index on question 2.
  5. Second question, enter 3, click on submit.

The response is correctly saved.
Any alternative flows where i only use the question index for navigation also work.

finnnns

finnnns

2013-12-17 11:27

reporter   ~27579

Reminder sent to: sammousa

Thank you for your time.

Unfortunately due to NDA reasons I can't send you a survey file.

Maybe you can nevertheless imagine yourself the following setting:

The survey was activated in closed access mode and token-based response persistence was activated. The option "Format" was set to "Group by Group", the "Show question index / allow jumping" option to "Full", the "Show [<< Prev] button" option to "Yes" and the "Participant may save and resume later?" to "Yes".

  1. Access the survey using the link from the invitation mail. Fill out several questions. This can include navigating between several question groups using the question index as well as the Next/Previous buttons.
  2. The user interrupts the survey by either clicking on the "Resume later" button, closing the browser or letting some time pass by. Answers up to this seem to be saved correctly.
  3. The continues filling out the questions by either re-accessing the Survey using the link from the invitation or by continuing in the same browser window after pausing. Beyond this point the answers are not persisted on the server anymore. Some Feedbacks from the testers also suggest that some of the answers are not persisted within the session when navigating between the question groups. This could however not be reproduces on our side.

What Do you reckon?

sammousa

sammousa

2013-12-17 11:39

reporter   ~27581

Our current session management is pretty much spaghetti.
For now you should consider a work around, any of the following might apply:

  • Switch to incremental question index.
  • Disable saving / resuming later
  • Don't use tokens.

In the upcoming version we will be focusing on cleaning up a lot of our code, this should help us in closing in on this issue.

finnnns

finnnns

2013-12-17 11:44

reporter   ~27583

Reminder sent to: sammousa

Thank you!

But: from your expert point of view, what do you think of philg's submitted code? it seems to do the trick, I'm just hesitating because you didn't react to his proposal nor include it in some commits.

sammousa

sammousa

2013-12-17 11:46

reporter   ~27584

Honestly I have no idea what other side effects can be caused and I dont have a lot of time to invest in figuring that out right now.

Please stop sending reminders, they cause mail spam; also it makes each of your comments private which means i have to make them public.

philg

philg

2013-12-17 14:30

reporter   ~27589

hi all, i'm not in my compagny this week but in paris for formation.
i have find a solution to solve the problem. In fact, when you save a group question, some fields of other
group question are add in the update query with null value.
If i have enought time i will you send the code to correct this.
philg

philg

philg

2013-12-26 15:52

reporter   ~27700

hi all
like promiss, i put here the solution that i have find to resolve the save problem when user switch form a group to an other and when some field are saved with empty value.
In fact, in the file application/helpers/expressions/em_manager_helper.php
in the function function _UpdateValuesInDatabase($updatedValues, $finished=false) wich take and array updatedValues on argument, the first line in the function erase this parameter with this call : $updatedValues = $this->updatedValues;

In fact this function permiss to know wich field have to be update ( normaly the field of the current group ) and the value of this field.
When i have make test, i find that the method $this->updatedValues add other field for other group with null values ! Or the parameters initial parameters updatedValues where good ....

The simple solution to resolve my problem is to comment the first line of the function :
//$updatedValues = $this->updatedValues;

c_schmitz

c_schmitz

2014-03-02 22:29

administrator   ~29062

This bug report has become a mess.

Please create a new one after re-testing using the latest 2.05 version, and if your issue is still reproducible, attach a sample survey and a detailed description how to reproduce it. Thank you for your understanding.

Related Changesets

LimeSurvey: 2.05 de204931

2013-11-26 14:33:01

sammousa

Details Diff
Fixed issue 08408: reponse can't be update Affected Issues
08408
mod - application/helpers/SurveyRuntimeHelper.php Diff File

Issue History

Date Modified Username Field Change
2013-11-26 09:49 philg New Issue
2013-11-26 09:49 philg File Added: limesurvey_survey_545656(1).lss
2013-11-26 10:13 c_schmitz Status new => closed
2013-11-26 10:13 c_schmitz Assigned To => c_schmitz
2013-11-26 10:13 c_schmitz Resolution open => unable to reproduce
2013-11-26 10:29 c_schmitz Assigned To c_schmitz => sammousa
2013-11-26 10:29 c_schmitz Status closed => feedback
2013-11-26 10:29 c_schmitz Resolution unable to reproduce => reopened
2013-11-26 10:31 c_schmitz File Deleted: limesurvey_survey_545656(1).lss
2013-11-26 10:31 c_schmitz Relationship added related to 08122
2013-11-26 10:33 philg Issue Monitored: philg
2013-11-26 10:39 philg File Added: limesurvey_survey_545656(2).lss
2013-11-26 10:39 philg Note Added: 27404
2013-11-26 10:39 philg Status feedback => assigned
2013-11-26 15:34 sammousa Changeset attached => LimeSurvey 2.05 de204931
2013-11-26 15:34 sammousa Note Added: 27409
2013-11-26 16:17 sammousa Note Added: 27410
2013-11-26 16:17 sammousa Status assigned => feedback
2013-11-26 18:26 philg Note Added: 27412
2013-11-26 18:26 philg Status feedback => assigned
2013-11-27 13:51 philg Note Added: 27423
2013-12-11 14:37 finnnns Issue Monitored: finnnns
2013-12-11 14:41 finnnns Note Added: 27547
2013-12-12 16:59 finnnns Note Added: 27555
2013-12-17 09:24 finnnns Note Added: 27573
2013-12-17 09:25 finnnns Note View State: 27573: private
2013-12-17 10:06 sammousa Note Added: 27574
2013-12-17 11:27 finnnns Note Added: 27579
2013-12-17 11:27 finnnns Note View State: 27579: private
2013-12-17 11:37 sammousa Note View State: 27573: public
2013-12-17 11:37 sammousa Note View State: 27579: public
2013-12-17 11:39 sammousa Note Added: 27581
2013-12-17 11:44 finnnns Note Added: 27583
2013-12-17 11:44 finnnns Note View State: 27583: private
2013-12-17 11:44 sammousa Note View State: 27583: public
2013-12-17 11:46 sammousa Note Added: 27584
2013-12-17 14:30 philg Note Added: 27589
2013-12-26 15:52 philg Note Added: 27700
2014-03-02 22:29 c_schmitz Note Added: 29062
2014-03-02 22:29 c_schmitz Status assigned => closed
2014-03-02 22:29 c_schmitz Assigned To sammousa => c_schmitz
2014-03-02 22:29 c_schmitz Resolution reopened => unable to reproduce
2021-08-02 19:35 guest Bug heat 8 => 12