View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09486Bug reportsExpression Managerpublic2015-02-03 08:54
Reporterandrewz Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionnot fixable 
Product Version2.05+ 
Summary09486: dynamic images based on variable
Description

I'd like to display a dynamic image using a variable from another question (which is an equation), but it does not resolve correctly.

Steps To Reproduce

I tried two formats.

First is like the documentation <https://manual.limesurvey.org/Expression_Manager_HowTos> showing [img src='images/users{name}.jpg' alt='blah/'];
<p>[img src='/tmp/oc2015/{ChildName}.png' alt='Image'/];</p>

Second is like bug 5686 showing <img scr=images/{age}.jpg>
<p><img src='/tmp/oc2015/{ChildName}.png' alt='Image'/></p>

Additional Information
  1. Comes out as <p>[img src='/tmp/oc2015/<span id='LEMtailor_Q_128_115'>Sheila</span>.png' alt='Image'/];</p>

  2. Comes out as <img src='/tmp/oc2015/<span id='LEMtailor_Q_128_116'>Sheila</span>.png' alt='Image'/>

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)Version 2.05+ Build 141229
I will donate to the project if issue is resolvedNo
BrowserFirefox 35
Database type & versionMySQL 5.5
Server OS (if known)CentOS release 5.11
Webserver software & version (if known)Apache 2?
PHP Version5.3.29

Users monitoring this issue

There are no users monitoring this issue.

Activities

andrewz

andrewz

2015-01-30 20:16

reporter   ~31580

I am attaching the survey group

DenisChenu

DenisChenu

2015-02-01 18:07

developer   ~31582

If the question is in same group, it can be updated , then need is for javascript.

Move it at the group before and it come static.

andrewz

andrewz

2015-02-02 19:40

reporter   ~31606

@DenisChenu: The issue is not whether ChildName (an equation "question") is static, though it is static because of the conditional "if(is_empty...)". If it were an issue of the field changing, then the wrong image would load, but actually an image never loads. Regardless of the contents of "ChildName," it is not possible to make a dynamic IMG element because of the extra SPAN element.

If variables inside an IMG are not supported, then the documentation is wrong (https://manual.limesurvey.org/Expression_Manager_HowTos%3E)

DenisChenu

DenisChenu

2015-02-03 08:37

developer   ~31609

The doc is rigth if the First question is in another group.

1st group : IMG Choose the image : list of choice A1, A2.
2nd group (for a group by group mode) : {IMG} => "A1" or "A2"

If it's same group
{IMG} => < span id="an_id_to_be_updated_by_javascript" >A1</ span >

Then : move it to another group or use Question by question mode.

DenisChenu

DenisChenu

2015-02-03 08:54

developer   ~31610

See https://manual.limesurvey.org/Expression_Manager_HowTos#Types_and_Meanings_of_Syntax_Highlighting

Issue History

Date Modified Username Field Change
2015-01-30 19:46 andrewz New Issue
2015-01-30 20:16 andrewz Note Added: 31580
2015-01-30 20:16 andrewz File Added: limesurvey_group_22.lsg
2015-02-01 18:07 DenisChenu Note Added: 31582
2015-02-02 11:12 c_schmitz Status new => closed
2015-02-02 11:12 c_schmitz Assigned To => c_schmitz
2015-02-02 11:12 c_schmitz Resolution open => won't fix
2015-02-02 19:40 andrewz Note Added: 31606
2015-02-02 19:40 andrewz Status closed => feedback
2015-02-02 19:40 andrewz Resolution won't fix => reopened
2015-02-03 08:37 DenisChenu Note Added: 31609
2015-02-03 08:41 DenisChenu Status feedback => closed
2015-02-03 08:41 DenisChenu Resolution reopened => won't fix
2015-02-03 08:54 DenisChenu Assigned To c_schmitz => DenisChenu
2015-02-03 08:54 DenisChenu Note Added: 31610
2015-02-03 08:54 DenisChenu Status closed => feedback
2015-02-03 08:54 DenisChenu Resolution won't fix => reopened
2015-02-03 08:54 DenisChenu Status feedback => closed
2015-02-03 08:54 DenisChenu Resolution reopened => not fixable