View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
07309Bug reportsSurvey takingpublic2013-03-11 15:04
ReporterMazi Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Target Version2.00+Fixed in Version2.00+ 
Summary07309: Placeholders referring to dual scale question do not work
Description

When using a dual scale question and displaying the results at a following question using placeholders, then this doesn't work if questions are on the same page.

Steps To Reproduce
  1. Import the attached survey.
  2. Run it in group by group mode
    -> Placeholders do not work
  3. Switch to question by question mode -> everything works fine.
Additional Information

Same problem seems to show up when using radio buttons instead of the drop down layout.

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)130213
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5
Server OS (if known)Windows 7
Webserver software & version (if known)Apache 2.2
PHP Version5.3.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2013-02-17 09:54

administrator   ~24134

It does not work here in dropdown or radio. It is a problem that cannot be fixed easily because of the illegal field naming for dual scale questions.

Mazi

Mazi

2013-02-19 11:12

updater   ~24149

This is a rather serious issue since it holds one of my customer off launching a large and complex survey which should start in 5-7 days, so I would be very happy about a short term fix.

Let me know if I can help with testing or if you need additional information.

DenisChenu

DenisChenu

2013-02-19 12:40

developer   ~24167

It's an EM issue, and like all EM issue, it's hard to debug.

A quick possible javascript workaround:

  • delegate a click function to td for table.question
  • in this click function :
    -- check the line clicked and get the sub question
    -- check the input:radio:checked index and get the head with same index (the answers)
    -> Doing own replacment

This don't use the id, then think it can work.

It's not the EM way, then it's a workaround.

DenisChenu

DenisChenu

2013-02-21 11:31

developer   ~24185

Reminder sent to: Mazi

I have it, but actually it break min answers and max answers.

Mazi: can you try min answer and max answer on this question type and see if it's OK or not.

If it's not OK, i pull/close this one and put a new bug for min_answers and max_answers (and surely some other attributes)

Mazi

Mazi

2013-02-21 12:17

updater   ~24186

It seems that there is another bug with min and max answers, see http://limesurvey-templates.com/20/index.php/survey/index/sid/922399/newtest/Y/lang/en

DenisChenu

DenisChenu

2013-02-21 12:26

developer   ~24189

OK,

Then it don't work actually with min/max .

Cool, pushing it this evening and i put another bug for min/max :)

Mazi

Mazi

2013-02-21 13:06

updater   ~24190

Great, thanks a lot!

DenisChenu

DenisChenu

2013-02-21 20:00

developer   ~24192

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

DenisChenu

DenisChenu

2013-02-21 20:06

developer   ~24194

Yeah !

I'm happy ...

Tested:
EM epxression in another question
Filter array for array_dual and from array_dual
min_answers and ma_answers
{self.sq_0} ans {self.sq_SQ001}

I rework a little the HTML and move whole js in external files. Just to remove the input hidden for EM in javascript to. Think this input can be competely removed with a better ExprMgr_process_relevance_and_tailoring function.

Denis.
PS: Mazi : can you do some test please ?

Mazi

Mazi

2013-02-22 09:53

updater   ~24196

Thanks for your work, Denis.

I can't test right now because my dev system is currently broken. I hope to fix this next week.

Maybe Carsten can have a short look!?

Mazi

Mazi

2013-02-26 15:21

updater   ~24291

Denis, did the placeholders for dual scale questions change?

See this test survey: http://limesurvey-templates.com/20/index.php/survey/index/sid/467752/newtest/Y/lang/de

The month is replaced correctly but the year is not shown. For the month {Dual_1_0.shown} is used which works fine, for the year {Dual_1_1.shown} is used which does NOT work.

Any ideas?

DenisChenu

DenisChenu

2013-02-26 16:05

developer   ~24292

Can you test with an letter in the subQ.

Because EM don't make difference betwwen _1 for scale and _1 for answer.

The Dual_A1_1 can be better

Mazi

Mazi

2013-02-26 16:17

updater   ~24293

I have changed the subquestion code from 1 to sq1 but this didn't solve the problem: http://limesurvey-templates.com/20/index.php/survey/index/sid/467752/newtest/Y/lang/de

I also changed the scale codes to a1,a2,a3... and b1,b2,b3...

Mazi

Mazi

2013-02-26 16:27

updater   ~24294

Weird, at this survey it seems to work fine: http://limesurvey-templates.com/20/index.php/survey/index/sid/922399/newtest/Y/lang/en

DenisChenu

DenisChenu

2013-02-27 02:18

developer   ~24427

Mazi:

Can you export this one:
http://limesurvey-templates.com/20/index.php/survey/index/sid/467752/newtest/Y/lang/de

Please

TMSWhite

TMSWhite

2013-02-27 06:04

reporter   ~24430

Mazi and Denis-

For reference, the originally attached survey works fine in the final version of 1.92. The use of '#' in name and id attributes was fine there. There must have been some changes in 2.0 that introduced incompatibility with that naming.

I recommend regression testing these changes against all of the test surveys in /demos/surveys to ensure everything still works properly. For example, numeric scale codes should work (and used to work in 1.92). If these changes require that authors change to use scale codes like a1, a2, a3, instead of 1,2,3, then this set of fixes have introduced a regression.

Mazi

Mazi

2013-03-01 16:57

updater   ~24456

Requested survey attached.

DenisChenu

DenisChenu

2013-03-05 15:31

developer   ~24556

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

c_schmitz

c_schmitz

2013-03-07 22:39

administrator   ~24574

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

c_schmitz

c_schmitz

2013-03-11 15:04

administrator   ~24627

2.00+ build 130311 released

Related Changesets

LimeSurvey: master 9c0ce00e

2013-02-21 18:56:07

DenisChenu

Details Diff
Fixed issue 07309: Placeholders referring to dual scale question do not work
Fixed issue #4638: Array Dual Scale - Dual Dropdown - id contains #
Dev: remove # in answer id, but leave it in name: no need table updating like this
Dev: remove # in EM input name (hidden id="java....")
Dev: Lauch ExprMgr_process_relevance_and_tailoring in external javascript (think it's the way to do)
Dev: some fix for specific attributes in array_dual
Dev: all to be redone for 2.1/Plugin ...
Affected Issues
04638, 07309
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File
add - scripts/dualscale.js Diff File
mod - scripts/survey_runtime.js Diff File

LimeSurvey: master 9f934f2d

2013-03-05 14:27:44

DenisChenu

Details Diff
Fixed issue 07309: Placeholders referring to dual scale question do not work
Dev: lost some match in em javascript
Affected Issues
07309
mod - scripts/expressions/em_javascript.js Diff File

LimeSurvey: 2.05 7aca4ab7

2013-03-05 14:27:44

DenisChenu


Committer: c_schmitz Details Diff
Fixed issue 07309: Placeholders referring to dual scale question do not work
Dev: lost some match in em javascript
Affected Issues
07309
mod - scripts/expressions/em_javascript.js Diff File

Issue History

Date Modified Username Field Change
2013-02-16 22:43 Mazi New Issue
2013-02-16 22:43 Mazi Status new => assigned
2013-02-16 22:43 Mazi Assigned To => c_schmitz
2013-02-16 22:43 Mazi File Added: limesurvey_survey_467752-Dual_Scale_Problem.lss
2013-02-17 09:54 c_schmitz Note Added: 24134
2013-02-18 22:11 DenisChenu Assigned To c_schmitz => DenisChenu
2013-02-19 11:12 Mazi Note Added: 24149
2013-02-19 12:40 DenisChenu Note Added: 24167
2013-02-21 11:31 DenisChenu Note Added: 24185
2013-02-21 12:17 Mazi Note Added: 24186
2013-02-21 12:26 DenisChenu Note Added: 24189
2013-02-21 13:06 Mazi Note Added: 24190
2013-02-21 20:00 DenisChenu Changeset attached => LimeSurvey master 9c0ce00e
2013-02-21 20:00 DenisChenu Note Added: 24192
2013-02-21 20:00 DenisChenu Resolution open => fixed
2013-02-21 20:06 DenisChenu Note Added: 24194
2013-02-21 20:06 DenisChenu Status assigned => resolved
2013-02-21 20:06 DenisChenu Fixed in Version => 2.00+
2013-02-22 09:53 Mazi Note Added: 24196
2013-02-26 15:21 Mazi Note Added: 24291
2013-02-26 15:22 Mazi Status resolved => assigned
2013-02-26 16:05 DenisChenu Note Added: 24292
2013-02-26 16:17 Mazi Note Added: 24293
2013-02-26 16:27 Mazi Note Added: 24294
2013-02-27 02:18 DenisChenu Note Added: 24427
2013-02-27 06:04 TMSWhite Note Added: 24430
2013-03-01 16:57 Mazi File Added: limesurvey_survey_467752.lss
2013-03-01 16:57 Mazi Note Added: 24456
2013-03-05 15:31 DenisChenu Changeset attached => LimeSurvey master 9f934f2d
2013-03-05 15:31 DenisChenu Note Added: 24556
2013-03-05 15:32 DenisChenu Status assigned => resolved
2013-03-07 22:39 c_schmitz Changeset attached => LimeSurvey 2.05 7aca4ab7
2013-03-07 22:39 c_schmitz Note Added: 24574
2013-03-11 15:04 c_schmitz Note Added: 24627
2013-03-11 15:04 c_schmitz Status resolved => closed