View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
17883Bug reportsImport/Exportpublic2022-08-05 03:24
Reporter2BITS_PL Assigned Toadamzammit  
PrioritynoneSeverityminor 
Status confirmedResolutionopen 
Product Version3.25.19 
Summary17883: QueXML formatting cannot be changed
Description

There is a hard-defined variable "style" in the quexmlpdf.php file.

If from the survey I go to menu Survey setting: Overview > Display/Export (button) > queXML PDF - path: "admin/export/sa/quexml/surveyid/xxxxxx".
Above style is loaded, I can modify it before exporting. The problem is that my configuration isn't saved anywhere. When I go back to exporting, it doesn't see my previous changes.

The second view inside the survey edition, go to the Survey menu: Responses. In the list, in one line, I click the "View response details as queXML PDF" icon. Tutja can't change style, it loads default from quexmlpdf.php.

The second view inside the survey edition, go to the Survey menu: Responses. In the list, in one line, I click the "View response details as queXML PDF" icon. Tutja can't change style, it loads default from quexmlpdf.php. I looked at https://demo.limesurvey.org/ and I see the same problem there.

Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)v3.25.19+210323
I will donate to the project if issue is resolvedNo
Browser
Database type & versionSQL Server 2019
Server OS (if known)Microsoft Server 2019
Webserver software & version (if known)
PHP Versionv7.4.15 NTS x64

Users monitoring this issue

User List 2BITS_PL

Activities

adamzammit

adamzammit

2022-02-11 04:16

developer   ~68266

I can confirm that the "Style" portion is currently not saved. I think originally this was due to XML content not playing nicely with the SaveSettings function.

I can also confirm that when using "View response details as queXML PDF", the export appears as default.

I'll work up a pull request soon that addresses these issues.

adamzammit

adamzammit

2022-02-15 06:01

developer   ~68294

I've worked up a patch here:

https://github.com/LimeSurvey/LimeSurvey/compare/3.x-LTS...adamzammit:fix-17883.diff

Can you please give it a go and see if it works for you and then I will submit it to be included in the next LTS release.

Thanks

2BITS_PL

2BITS_PL

2022-02-22 12:04

reporter   ~68349

I checked, the configuration is saved in the database and it works globally, but only on the administration panel side. I haven't tested XSS and SQL Injection.

Not working, in the participant results print page, after completing the survey, below is a fix that worked here. But I don't know if that's all.

fixedPrintanswerController.diff (974 bytes)   
 application/controllers/PrintanswersController.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/application/controllers/PrintanswersController.php b/application/controllers/PrintanswersController.php
index 36d10148..c502c0a4 100644
--- a/application/controllers/PrintanswersController.php
+++ b/application/controllers/PrintanswersController.php
@@ -190,6 +190,15 @@ class PrintanswersController extends LSYii_Controller
 
             $quexmlpdf = new quexmlpdf();
 
+            //apply settings stored at last output
+            foreach ($quexmlpdf->_quexmlsettings() as $s) {
+                $setting = getGlobalSetting($s);
+                if ($setting !== null && trim($setting) !== '') {
+                    $method = str_replace("queXML", "set", $s);
+                    $quexmlpdf->$method($setting);
+                }
+            }
+
             // Setting the selected language for printout
             App()->setLanguage($sLanguage);
 
2BITS_PL

2BITS_PL

2022-08-04 09:24

reporter   ~71318

Will it be corrected and implemented and when?

adamzammit

adamzammit

2022-08-05 03:24

developer   ~71345

My apologies for this - it had fallen off my radar. Thank you for reminding me.

I've applied your patch and submitted a pull request here: https://github.com/LimeSurvey/LimeSurvey/pull/2561

Issue History

Date Modified Username Field Change
2022-02-10 14:14 2BITS_PL New Issue
2022-02-10 14:25 2BITS_PL Issue Monitored: 2BITS_PL
2022-02-10 14:25 2BITS_PL Bug heat 0 => 2
2022-02-11 04:14 adamzammit Assigned To => adamzammit
2022-02-11 04:14 adamzammit Status new => assigned
2022-02-11 04:16 adamzammit Status assigned => confirmed
2022-02-11 04:16 adamzammit Note Added: 68266
2022-02-11 04:16 adamzammit Bug heat 2 => 4
2022-02-15 06:01 adamzammit Note Added: 68294
2022-02-22 12:04 2BITS_PL Note Added: 68349
2022-02-22 12:04 2BITS_PL File Added: fixedPrintanswerController.diff
2022-02-22 12:04 2BITS_PL Bug heat 4 => 6
2022-08-04 09:24 2BITS_PL Note Added: 71318
2022-08-05 03:24 adamzammit Note Added: 71345