View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
06998Bug reportsConditionspublic2013-02-24 17:52
ReporterResearchOnBlogs Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06998: question is hidden by condition - no single preview anymore
Description

If you hide a question by condition, there is no single preview of this question possible anymore.

TagsNo tags attached.
Attached Files
source_1.gif (12,618 bytes)   
source_1.gif (12,618 bytes)   
Bug heat14
Complete LimeSurvey version number (& build)121127
I will donate to the project if issue is resolvedNo
Browser
Database type & versionx
Server OS (if known)x
Webserver software & version (if known)x
PHP Versionx

Relationships

related to 07315 closedDenisChenu Validation regex not being checked / not working (logic test ok) 

Users monitoring this issue

bquiller, tpartner

Activities

c_schmitz

c_schmitz

2012-12-06 00:24

administrator   ~22940

Well, strictly speaking this is correct because the condition on that question has not been met.
Shnoulle, do you see an easy way to fix this? I did have a looong look but were not able to come up with a solution. It would be ugly, anyway, because essentially it means that we override EM, somehow.

DenisChenu

DenisChenu

2012-12-06 00:42

developer   ~22942

Yes, some idea, but not really tested.

In 1.92, there are some javascript for question group, but it break all other javascripting ... (for example the "Exclusive option" settings).

I can look at this one next week.
A lot of patch to do actually ;) and this week end is closed, i go to a "The Lord of the Rings Night", the trilogy on a big screen \o/

TMSWhite

TMSWhite

2012-12-06 04:03

reporter   ~22956

In 1.92, there was extra javascript for question preview to essentially disable relevance for that question, forcing it to be displayed.

DenisChenu

DenisChenu

2012-12-07 13:23

developer   ~23025

Thomas,

Can you give me some help please, i want to remove the inline <style="display:none"> because is set in HTML not only via javascript.

The i make a
grep -R "display:none" *

But don't find where is set for questionid.

Denis

mdekker

mdekker

2012-12-12 11:37

reporter   ~23163

In 1.92 I found:
https://github.com/LimeSurvey/LimeSurvey/blob/1.92/admin/preview.php

it always does a show on the question in the javascript... maybe that is a pointer in the right direction?

mdekker

mdekker

2012-12-12 12:21

reporter   ~23165

In 2.00 question preview is handled via controllers/survey/index/. The question preview code is in controllers/admin/question that should be merged.

In surveyruntime helper (around line 863) there is specific javascript for preview group, but not for question.

@Schnoulle, can you fix this or should I give it a try?

mdekker

mdekker

2012-12-12 12:37

reporter   ~23167

Fix was easier than I thought... I will commit in a sec, maybe someone can review it before release.

mdekker

mdekker

2012-12-12 13:02

reporter   ~23169

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

tpartner

tpartner

2012-12-12 14:12

partner   ~23173

Hi mdekker,

I'm not sure I understand the need for the $(document).change() function or the keydown event on the tab key but, if they are required, I think maybe this:

$('#question'. LEMqid).show();

Should be this:

$('#question'+LEMqid).show();
DenisChenu

DenisChenu

2012-12-12 18:52

developer   ~23183

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

DenisChenu

DenisChenu

2012-12-12 18:56

developer   ~23184

Tony: not it's php not js :).

tpartner

tpartner

2012-12-12 21:34

partner   ~23190

Denis, I don't think it's supposed to be PHP, it's not wrapped in double-quotes or followed by a dot.

When formatted as valid JS, '#question'+LEMqid+'' returns the same as '#question" . $_qid . "'.

DenisChenu

DenisChenu

2012-12-12 22:08

developer   ~23193

'#question" . $_qid . "' => #questionTHENUMBEROFTHEQUESTION directly in the source .

No ?

(see source ;) )

tpartner

tpartner

2012-12-12 22:25

partner   ~23197

Er...no...see my screenshot of the source :)

DenisChenu

DenisChenu

2012-12-12 22:29

developer   ~23198

Last edited: 2012-12-12 22:32

Yes, you're right, first is OK, not the second.

Send a quick patch
https://github.com/LimeSurvey/LimeSurvey/commit/4e30e773c310604226328abd33ef31eaa5689eed

tpartner

tpartner

2012-12-12 23:18

partner   ~23199

Thanks Denis.

I still don't get the reason for the "change" and "keydown" handlers. I just don't see what they could do.

But, if you are re-doing it for 2.1, I guess they can stay. As Menno says, they're not hurting anything.

DenisChenu

DenisChenu

2012-12-13 01:21

developer   ~23201

Hello Tony,

With EM:
Hidding question in HTML
Hidding question in Javascript 3 or 4 times .

DenisChenu

DenisChenu

2013-01-31 20:58

developer   ~23926

Working now.

mdekker fix and mine is OK.

c_schmitz

c_schmitz

2013-02-07 10:52

administrator   ~23964

New version 2.00 build 120206 released.

Related Changesets

LimeSurvey: master 6c663c34

2012-12-12 13:01

mdekker


Details Diff
Fixed 06998: question is hidden by condition - no single preview anymore
dev: if confirmed that it is not used anymore, the code in question.php can be removed, left it in for comparison now
Affected Issues
06998
mod - application/controllers/admin/question.php Diff File
mod - application/helpers/SurveyRuntimeHelper.php Diff File

LimeSurvey: master f06e23df

2012-12-12 18:50

DenisChenu


Details Diff
Dev: HTML fix for 06998 Affected Issues
06998
mod - application/helpers/SurveyRuntimeHelper.php Diff File

Issue History

Date Modified Username Field Change
2012-11-30 17:57 ResearchOnBlogs New Issue
2012-11-30 17:57 ResearchOnBlogs File Added: limesurvey_survey_264877.lss
2012-12-05 23:33 c_schmitz Assigned To => c_schmitz
2012-12-05 23:33 c_schmitz Status new => assigned
2012-12-06 00:23 c_schmitz Assigned To c_schmitz => DenisChenu
2012-12-06 00:24 c_schmitz Note Added: 22940
2012-12-06 00:29 c_schmitz Issue Monitored: tpartner
2012-12-06 00:42 DenisChenu Note Added: 22942
2012-12-06 04:03 TMSWhite Note Added: 22956
2012-12-07 13:23 DenisChenu Note Added: 23025
2012-12-12 10:17 bquiller Issue Monitored: bquiller
2012-12-12 11:37 mdekker Note Added: 23163
2012-12-12 12:21 mdekker Note Added: 23165
2012-12-12 12:37 mdekker Note Added: 23167
2012-12-12 13:02 mdekker Changeset attached => LimeSurvey master 6c663c34
2012-12-12 13:02 mdekker Note Added: 23169
2012-12-12 13:02 mdekker Assigned To DenisChenu => mdekker
2012-12-12 13:02 mdekker Resolution open => fixed
2012-12-12 14:12 tpartner Note Added: 23173
2012-12-12 18:52 DenisChenu Changeset attached => LimeSurvey master f06e23df
2012-12-12 18:52 DenisChenu Note Added: 23183
2012-12-12 18:52 DenisChenu Assigned To mdekker => DenisChenu
2012-12-12 18:54 DenisChenu Assigned To DenisChenu => mdekker
2012-12-12 18:56 DenisChenu Note Added: 23184
2012-12-12 21:34 tpartner Note Added: 23190
2012-12-12 22:08 DenisChenu Note Added: 23193
2012-12-12 22:24 tpartner File Added: source_1.gif
2012-12-12 22:25 tpartner Note Added: 23197
2012-12-12 22:29 DenisChenu Note Added: 23198
2012-12-12 22:32 DenisChenu Note Edited: 23198
2012-12-12 23:18 tpartner Note Added: 23199
2012-12-13 01:21 DenisChenu Note Added: 23201
2013-01-31 20:53 c_schmitz Assigned To mdekker => DenisChenu
2013-01-31 20:58 DenisChenu Note Added: 23926
2013-01-31 20:58 DenisChenu Status assigned => resolved
2013-01-31 20:58 DenisChenu Fixed in Version => 2.00+
2013-02-07 10:52 c_schmitz Note Added: 23964
2013-02-07 10:52 c_schmitz Status resolved => closed
2013-02-24 17:52 c_schmitz Relationship added related to 07315
2021-08-03 09:02 guest Bug heat 10 => 14