View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06338Bug reportsOtherpublic2013-03-12 14:51
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version2.00+ 
Summary06338: Group preview and question preview : exclusive_option don't work
Description

In some condition, exclusive_option don't work in group preview or question preview.

Steps To Reproduce

Create a survey,
Add a group with one question
Add a second group with only one multi choice question
Add an exclusive option

Lauch a question preview or a group preview: exclusive multi-choice don't work.

Additional Information

Seems to work if there are 2 question.

Put a survey with 3 group, test and test again.

Maybe you have to activate/deactivate survey to see the problem ?

Seem too: for groupe 2: if you launch group preview and after quetsion preview: working, if you launch directly question preview: don't work.

Somme session problem maybe.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)120718
I will donate to the project if issue is resolvedNo
BrowserFF12 (tested with IE9 too)
Database type & versionMysql 5
Server OS (if known)debian/linux
Webserver software & version (if known)apache
PHP VersionPHP Version 5.3

Relationships

duplicate of 07315 closedDenisChenu Validation regex not being checked / not working (logic test ok) 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2012-07-19 18:05

developer   ~19809

Updated :
Seem to have some Relevance Equation on group.

Here:
Test Group 3.
Ther relevance equation is allway false in previewgroup, the all other EM javascript don't do.

Tom, can you have a look, please ?

TMSWhite

TMSWhite

2012-07-19 20:11

reporter   ~19810

Denis-

I don't see a simple solution.

The root problem is that question preview uses preview.php, but survey and group preview (along with real data collection) use group.php. Preview.php makes a number of assumptions in an effort to simplify the code. It seems to be making too many such assumptions, and it is hard to keep its code-base in sync with group.php.

The best solution is to remove preview.php and augment group.php to show single questions. That would ensure that everything else is the same. However, since that is a pretty major change, I'd recommend not attempting that for 1.92, but rather ensuring that 2.0 takes that strategy.

In the meantime, since this is minor, and there is an easy work-around (use group or survey-level preview to preview the logic; and use question level preview mostly for cosmetics), I think this issue can be flagged as "won't fix".

/Tom

DenisChenu

DenisChenu

2012-07-19 20:32

developer   ~19811

Hello Tom,

No, it's on group preview here too.

The javascript is:
if (RELEVANCE_GROUP){
$('group-{gid}').show();
THE javascript for question
}else{
$('group-{gid}').show();
}

Without group preview:
THE javascript for questions

I test with "array_filter" and same think : array_filter don't go because there are relevance in group.

Maybe best is to remove all group relevance calculation if $preview ?

DenisChenu

DenisChenu

2012-07-19 20:37

developer   ~19813

Hello Tom,

What do you think of a
$LEM->previewMode ?

Denis

TMSWhite

TMSWhite

2012-07-19 20:38

reporter   ~19814

Again, good ideas for 2.0, but perhaps overkill for 1.92+

Yes, for your third group, it wasn't executing the exclusion filter because the whole group was irrelevant. So, disabling the group-level relevance in group AND question preview modes is the ideal solution; but that is a pretty significant change.

TMSWhite

TMSWhite

2012-07-19 20:42

reporter   ~19815

Yes, a $LEM->previewMode could be used to conditionally turn off question and/or group-level relevance (and perhaps mandatory too). However, that is a bigger change than I'm prepared to tackle at this time.

DenisChenu

DenisChenu

2012-10-11 14:53

developer   ~21226

Hello,

Another idea: add a {ACTIVE} or {PREVIEW} global EM expression.
{ACTIVE} is true if survey is answered
{PREVIEW}: true if it's preview mode.

Then if preview group : we can add allways or {PREVIEW} on Relevance equation
If preview quetsion : allways add or {PREVIEW} on releavance equation.

But user can add themeself or {PREVIEW} in relevance equation for condition on another group. For example:

Question G2Q2 relevance equation: (G1Q1=="Y" or PREVIEW) and G2Q1=="Y"

Issue History

Date Modified Username Field Change
2012-07-18 18:30 DenisChenu New Issue
2012-07-18 18:30 DenisChenu File Added: limesurvey_survey_exclusive-bug.lss
2012-07-18 18:30 DenisChenu Steps to Reproduce Updated
2012-07-18 21:12 c_schmitz Assigned To => DenisChenu
2012-07-18 21:12 c_schmitz Status new => assigned
2012-07-19 18:01 DenisChenu File Added: limesurvey_survey_39514.lss
2012-07-19 18:01 DenisChenu File Deleted: limesurvey_survey_exclusive-bug.lss
2012-07-19 18:02 DenisChenu File Deleted: limesurvey_survey_39514.lss
2012-07-19 18:03 DenisChenu File Added: limesurvey_survey_39514.lss
2012-07-19 18:05 DenisChenu Note Added: 19809
2012-07-19 18:05 DenisChenu Assigned To DenisChenu => TMSWhite
2012-07-19 20:11 TMSWhite Note Added: 19810
2012-07-19 20:11 TMSWhite Assigned To TMSWhite =>
2012-07-19 20:11 TMSWhite Status assigned => acknowledged
2012-07-19 20:32 DenisChenu Note Added: 19811
2012-07-19 20:37 DenisChenu Note Added: 19813
2012-07-19 20:38 TMSWhite Note Added: 19814
2012-07-19 20:42 TMSWhite Note Added: 19815
2012-10-11 14:53 DenisChenu Note Added: 21226
2013-03-12 14:51 DenisChenu Relationship added duplicate of 07315
2013-03-12 14:51 DenisChenu Status acknowledged => closed
2013-03-12 14:51 DenisChenu Assigned To => DenisChenu
2013-03-12 14:51 DenisChenu Resolution open => fixed
2013-03-12 14:51 DenisChenu Fixed in Version => 2.00+