LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
05439Bug reports[All Projects] Survey takingpublic2011-09-01 16:112011-09-07 09:16
Reporterronvdburg 
Assigned Toc_schmitz 
PriorityhighSeveritymajor 
StatusclosedResolutionfixed 
Product Version1.91+ 
Target VersionFixed in Version1.91+ 
Summary05439: {TOKEN:ATTRIBUTE_1} is not replaced everywhere
DescriptionI used {TOKEN:ATTRIBUTE_1} in the question text.
This works properly when taking a survey.
This works properly when printing (printanswers.php).

However, the token attribute replacement is NOT done in exporting the answers to pdf (PDF Export).
Steps To ReproduceMake sure you have a survey with at least 1 (user defined) attribute.
Change a question text containing {TOKEN:ATTRIBUTE_1}.
Make the survey active & closed.
Create a token entry and add a proper text to the Token's attribute 1.
Take the survey and see:
= The question text properly replaces {TOKEN:ATTRIBUTE_1} with the proper text.
Now finish the survey and press submit.
Do print the survey and verify:
= The (html version) of the printable survey replaces properly.
= The PDF version shows {TOKEN:ATTRIBUTE_1} in stead of replacing it.
Additional InformationCould you please have repaired this today, my customer wants to send out the survey tomorrow.

If not possible, can you give me a hint to fix it myself (and uploading the patch)?

I see there exists a tokenReplace function in replacements.php.
I will donate to the project if issue is resolved within 48 hrsNo
LimeSurvey build number OR git commit ID10746
Browser
Database & DB-Versionmysql 14.12
Operating System (Server)Centos 2.2.3 (Linux version 2.6.18-194.3.1.el5)
Webserver software & versionApache/2.2.3 (CentOS)
PHP Version5.1.6
Attached Filestxt file icon printanswers.php.svn-diff.txt [^] (1,453 bytes) 2011-09-02 13:57 [Show Content]

- Relationships

-  Notes
User avatar (16188)
c_schmitz (administrator)
2011-09-01 18:51

Hi ronvdburg

are you a donator?
User avatar (16191)
ronvdburg (reporter)
2011-09-01 19:29

No, not with money, but I donate all the patches that I need (and are paid) by my customer.
User avatar (16192)
c_schmitz (administrator)
2011-09-01 21:22

ok, will have a look
User avatar (16208)
ronvdburg (reporter)
2011-09-02 14:01

Hi Carsten,

I found the issue and repaired it for my survey.
The patch is uploaded. Indeed it was so easy that I am ashamed that it took me so long.

The patch only does a tokenReplace in the question text; if you would like to also replace token fields elsewhere (e.g. the Group text), please let me know and I will send a new patch / svn-diff.

Regards,

Ron
User avatar (16215)
c_schmitz (administrator)
2011-09-02 17:27

Thank you. No further patch is needed for that because the replacement functions will be completel rewritten in the next version.
User avatar (16242)
c_schmitz (administrator)
2011-09-07 09:16

New version released

- Issue History
Date Modified Username Field Change
2011-09-01 16:11 ronvdburg New Issue
2011-09-01 18:51 c_schmitz Note Added: 16188
2011-09-01 18:51 c_schmitz Assigned To => c_schmitz
2011-09-01 18:51 c_schmitz Status new => feedback
2011-09-01 19:29 ronvdburg Note Added: 16191
2011-09-01 19:29 ronvdburg Status feedback => assigned
2011-09-01 21:22 c_schmitz Note Added: 16192
2011-09-02 13:57 ronvdburg File Added: printanswers.php.svn-diff.txt
2011-09-02 14:01 ronvdburg Note Added: 16208
2011-09-02 17:27 c_schmitz Note Added: 16215
2011-09-02 17:27 c_schmitz Status assigned => resolved
2011-09-02 17:27 c_schmitz Fixed in Version => 1.91+
2011-09-02 17:27 c_schmitz Resolution open => fixed
2011-09-07 09:16 c_schmitz Note Added: 16242
2011-09-07 09:16 c_schmitz Status resolved => closed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker