View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08395Bug reportsSurvey takingpublic2014-03-17 13:14
Reportermofog Assigned ToDenisChenu  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.05+ 
Summary08395: Questions randomly not showing
Description

If 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 Reproduce

Create 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.

TagsNo tags attached.
Attached Files
h6bc55a5.png (31,298 bytes)   
limesurvey_survey_596393(1).lss (14,193 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)131107
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysqld Ver 5.1.61-ndb-7.1.22-log for suse-linux-gnu on x86_64 (SUSE MySQL RPM)
Server OS (if known)OpenSuSE
Webserver software & version (if known)Apache/2.2.21 (Linux/SUSE)
PHP Version5.3.8

Relationships

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

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2013-11-22 11:42

administrator   ~27313

Last edited: 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.

mofog

mofog

2013-11-22 15:02

reporter   ~27326

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.

c_schmitz

c_schmitz

2013-11-25 14:43

administrator   ~27364

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.

mofog

mofog

2013-11-26 11:47

reporter   ~27405

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.

c_schmitz

c_schmitz

2013-11-27 10:39

administrator   ~27415

Can you attach your reduced survey, please?

mofog

mofog

2013-11-27 13:11

reporter   ~27421

Sorry, of course.

c_schmitz

c_schmitz

2013-11-27 15:49

administrator   ~27431

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.

mofog

mofog

2013-11-27 22:16

reporter   ~27441

I'm glad we finally got to the root of the problem! Please let me know if you need any help.

c_schmitz

c_schmitz

2013-12-18 18:52

administrator   ~27619

It looks like the issue was introduced with conversion to Yii/2.0 - it works fine in 1.92 .

DenisChenu

DenisChenu

2013-12-28 16:40

developer   ~27703

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)

DenisChenu

DenisChenu

2014-01-02 18:12

developer   ~27715

Last edited: 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).

DenisChenu

DenisChenu

2014-03-03 09:39

developer   ~29068

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 ....

DenisChenu

DenisChenu

2014-03-03 19:03

developer   ~29082

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

Can you reproduce ?

DenisChenu

DenisChenu

2014-03-03 19:08

developer   ~29083

\o/ And adding RAND to the 2 group seems to work too ....

mofog

mofog

2014-03-04 11:13

reporter   ~29088

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.

c_schmitz

c_schmitz

2014-03-17 13:14

administrator   ~29280

2.05+ Build 140317 released

Related Changesets

LimeSurvey: master d5889c76

2014-02-28 16:02

DenisChenu


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 ?
Affected Issues
08395, 08785
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
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
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