LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
08395Bug reports[All Projects] Survey takingpublic2013-11-20 12:572014-03-17 13:14
Reportermofog 
Assigned ToDenisChenu 
PrioritynormalSeveritymajor 
StatusclosedResolutionfixed 
Product Version2.00+ 
Target VersionFixed in Version2.05+ 
Summary08395: Questions randomly not showing
DescriptionIf in a survey is set to question by question mode and uses both question groups and randomization groups, some questions randomly do not show in the rendered survey.
Steps To ReproduceCreate a new survey.
Set its mode to question by question.
Create two question groups (either with randomization groups or without, this is not relevant to the bug).
Create a couple of question within each question group, but use the same randomization group for each.
Test the survey.
Instead of showing the question and defined answers, the survey will sometimes turn up as shown in the attached screenshot.
I will donate to the project if issue is resolved within 48 hrsNo
LimeSurvey build number OR git commit ID131107
Browser
Database & DB-Versionmysqld Ver 5.1.61-ndb-7.1.22-log for suse-linux-gnu on x86_64 (SUSE MySQL RPM)
Operating System (Server)OpenSuSE
Webserver software & versionApache/2.2.21 (Linux/SUSE)
PHP Version5.3.8
Attached Filespng file icon h6bc55a5.png [^] (31,298 bytes) 2013-11-20 12:58


? file icon Bug08395.m4v [^] (986,884 bytes) 2013-11-26 11:47
? file icon limesurvey_survey_596393(1).lss [^] (14,193 bytes) 2013-11-27 15:48
png file icon Capture du 2014-03-03 19:00:49.png [^] (12,841 bytes) 2014-03-03 19:02


png file icon Capture du 2014-03-03 19:01:00.png [^] (14,032 bytes) 2014-03-03 19:02


png file icon Capture du 2014-03-03 19:07:50.png [^] (13,015 bytes) 2014-03-03 19:08

- Relationships
related to 08452closedDenisChenu Preview Question Group doesn't load randomly with Randomization Group set 

-  Notes
User avatar (27313)
c_schmitz (administrator)
2013-11-22 11:42
edited on: 2013-11-22 11:42

I am sorry but there is no such thing as 'sometimes'. If it turns up empty it should be reproducible by the actions you did previously.
Did you maybe change the survey while you were testing it? Does it happen if the survey is active?
Anyway, I cannot reproduce it here.

User avatar (27326)
mofog (reporter)
2013-11-22 15:02

I'm sorry for my unprecise statement. What I meant to say is that due to the randomization of the question order, sometimes the first, second, or third question is empty. It does not mean that the bug appears and disappears 'sometimes'.

No, I did not change the survey while testing it.

Yes, the described behavior can also be observed if the survey is active.
User avatar (27364)
c_schmitz (administrator)
2013-11-25 14:43

I am sorry, but I still cannot reproduce this here. All questions show here as they should. Can you copy the survey and see if you still have the problem?
If yes, can you remove questions until you have a minimum test case where it is reproducible for you? Please attach the resulting survey as .lss file. Thank you.
User avatar (27405)
mofog (reporter)
2013-11-26 11:47

I copied the survey and the problem persists.
I reduced the test case to only two question groups with one question each. The problem is still reproducible. However, 'sometimes' both questions are shown, 'sometimes' one or both aren't. For example:

Test#1: Question 1 shows, Question 2 shows.
Test#2: Question 2 shows, Question 1 shows.
Test#3: Question 2 shows, Question 1 shows.
Test#4: Empty question, Question 2 shows.
Test#5: Question 1 shows, Question 2 shows.
Test#6: Question 1 shows, empty question.

To illustrate this, I created a short demo video.
User avatar (27415)
c_schmitz (administrator)
2013-11-27 10:39

Can you attach your reduced survey, please?
User avatar (27421)
mofog (reporter)
2013-11-27 13:11

Sorry, of course.
User avatar (27431)
c_schmitz (administrator)
2013-11-27 15:49

I attached an even more condensed test case - the issue seems to happen if a question is shown in a different question group by randomization.
Fixing this is really tricky and may take some time.
User avatar (27441)
mofog (reporter)
2013-11-27 22:16

I'm glad we finally got to the root of the problem! Please let me know if you need any help.
User avatar (27619)
c_schmitz (administrator)
2013-12-18 18:52

It looks like the issue was introduced with conversion to Yii/2.0 - it works fine in 1.92 .
User avatar (27703)
DenisChenu (developer)
2013-12-28 16:40

Hi,

Seems the problem is :
                if ($gid != $qa[6]) {
line 1045 of SurveyRunTimeHelper ...

$qa take gid

An before we have :
                if ((isset($ia[10]) && $ia[10] == $gid) || (!isset($ia[10]) && $ia[5] == $gid))
Where $ia are taken from $_SESSION[$LEMsessid]['fieldarray']
And $qa are taken for retrieveAnswers($ia)
User avatar (27715)
DenisChenu (developer)
2014-01-02 18:12
edited on: 2014-01-02 18:21

With 1.92:

retrieveAnswers use global $gl
And return at 6 : $gl[0] surely updated group number or step

Yep: $gl[0] is the actual gid, we can fix it directly with:
$plus_qanda[5] = $gl['gid'] in SurveyRuntimeHelper.

But i really think the test is not needed because it's done before ($qanda is filled only with needed question).

User avatar (29068)
DenisChenu (developer)
2014-03-03 09:39

Arglll ... randome question+random group. The evil system \o/

I give a try ....

But i think it's make very difficult to work on 2.1 plugin system actually for this one ....
User avatar (29082)
DenisChenu (developer)
2014-03-03 19:03

@mofog : think it's fixed now in https://github.com/LimeSurvey/LimeSurvey/commit/d5889c76aad0957dc06909efe37fa7469cb804de [^] and some other (see screenshot).

Can you reproduce ?

User avatar (29083)
DenisChenu (developer)
2014-03-03 19:08

\o/ And adding RAND to the 2 group seems to work too ....
User avatar (29088)
mofog (reporter)
2014-03-04 11:13

Hi there. I just tested the latest version on github several times regarding this issue and can confirm that this issue seems to be resolved now. Random questions in random groups work fine now. Thanks a lot.
User avatar (29280)
c_schmitz (administrator)
2014-03-17 13:14

2.05+ Build 140317 released

- Related Changesets
LimeSurvey: master d5889c76
Timestamp: 2014-02-28 15:02:19
Author: DenisChenu
Committer: Denis Chenu
Details ] Diff ]
Fixed issue 08785: repeat questions when choosing "All in One" (Build 140226 )
Dev: add a $qa['finalgroup'], how we managed it when attribute is in Plugin ?
mod - application/helpers/SurveyRuntimeHelper.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-11-20 12:57 mofog New Issue
2013-11-20 12:57 mofog File Added: limesurvey_survey_482775.lss.xml
2013-11-20 12:58 mofog File Added: h6bc55a5.png
2013-11-22 11:42 c_schmitz Note Added: 27313
2013-11-22 11:42 c_schmitz Assigned To => c_schmitz
2013-11-22 11:42 c_schmitz Status new => feedback
2013-11-22 11:42 c_schmitz Note Edited: 27313 View Revisions
2013-11-22 15:02 mofog Note Added: 27326
2013-11-22 15:02 mofog Status feedback => assigned
2013-11-25 14:43 c_schmitz Note Added: 27364
2013-11-25 14:43 c_schmitz Status assigned => feedback
2013-11-26 11:47 mofog File Added: Bug08395.m4v
2013-11-26 11:47 mofog Note Added: 27405
2013-11-26 11:47 mofog Status feedback => assigned
2013-11-27 10:39 c_schmitz Note Added: 27415
2013-11-27 10:39 c_schmitz Status assigned => feedback
2013-11-27 13:10 mofog File Added: limesurvey_survey_596393.lss.xml
2013-11-27 13:11 mofog Note Added: 27421
2013-11-27 13:11 mofog Status feedback => assigned
2013-11-27 15:48 c_schmitz File Added: limesurvey_survey_596393(1).lss
2013-11-27 15:48 c_schmitz File Deleted: limesurvey_survey_596393.lss.xml
2013-11-27 15:49 c_schmitz Note Added: 27431
2013-11-27 22:16 mofog Note Added: 27441
2013-12-18 16:21 c_schmitz File Deleted: limesurvey_survey_482775.lss.xml
2013-12-18 18:52 c_schmitz Note Added: 27619
2013-12-18 21:54 c_schmitz Assigned To c_schmitz => mdekker
2013-12-18 21:54 c_schmitz Status assigned => feedback
2013-12-20 13:08 DenisChenu Relationship added related to 08452
2013-12-28 16:40 DenisChenu Note Added: 27703
2014-01-02 18:12 DenisChenu Note Added: 27715
2014-01-02 18:21 DenisChenu Note Edited: 27715 View Revisions
2014-03-02 22:30 c_schmitz Assigned To mdekker => DenisChenu
2014-03-02 22:30 c_schmitz Status feedback => assigned
2014-03-03 09:39 DenisChenu Note Added: 29068
2014-03-03 19:02 DenisChenu Changeset attached => LimeSurvey master d5889c76
2014-03-03 19:02 DenisChenu File Added: Capture du 2014-03-03 19:00:49.png
2014-03-03 19:02 DenisChenu File Added: Capture du 2014-03-03 19:01:00.png
2014-03-03 19:03 DenisChenu Note Added: 29082
2014-03-03 19:03 DenisChenu Status assigned => feedback
2014-03-03 19:08 DenisChenu File Added: Capture du 2014-03-03 19:07:50.png
2014-03-03 19:08 DenisChenu Note Added: 29083
2014-03-04 11:00 DenisChenu Status feedback => resolved
2014-03-04 11:00 DenisChenu Fixed in Version => 2.05+
2014-03-04 11:00 DenisChenu Resolution open => fixed
2014-03-04 11:13 mofog Note Added: 29088
2014-03-17 13:14 c_schmitz Note Added: 29280
2014-03-17 13:14 c_schmitz Status resolved => closed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker