View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17883 | Bug reports | Import/Export | public | 2022-02-10 14:14 | 2022-11-07 13:59 |
Reporter | 2BITS_PL | Assigned To | adamzammit | ||
Priority | none | Severity | minor | ||
Status | assigned | Resolution | fixed | ||
Product Version | 3.25.19 | ||||
Summary | 17883: 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". 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) | ||||
Tags | No tags attached. | ||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | v3.25.19+210323 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | SQL Server 2019 | ||||
Server OS (if known) | Microsoft Server 2019 | ||||
Webserver software & version (if known) | |||||
PHP Version | v7.4.15 NTS x64 | ||||
User List | 2BITS_PL |
---|
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. |
|
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 |
|
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); |
|
Will it be corrected and implemented and when? |
|
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 |
|
Code looks OK. |
|
thanks @gabrieljenik . I'm happy to work on a settings screen that is separate - maybe we could start a new bug/feature request for that and assign it to me? That could allow this PR to solve the current issue. Adam |
|
I guess best is to involve @c_schmitz into that decision :) |
|
Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34014 |
|
Fixed in Release 3.28.37+221108 |
|
Adam would you please prepare a prt for master as well as to have LTs and master at the same level? |
|
LimeSurvey: 3.x-LTS 5f7a35a2 2022-11-02 11:12:10 Committer: GitHub Details Diff |
Fixed issue 17883: QueXML formatting cannot be changed (#2561) Dev: Patch by 2BITS_PL |
Affected Issues 17883 |
|
mod - application/controllers/PrintanswersController.php | Diff File | ||
mod - application/controllers/admin/export.php | Diff File | ||
mod - application/controllers/admin/responses.php | Diff File | ||
mod - application/libraries/admin/quexmlpdf.php | Diff File | ||
mod - application/views/admin/survey/queXMLSurvey_view.php | Diff File |
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 | |
2022-10-04 14:21 | gabrieljenik | Status | confirmed => ready for testing |
2022-10-04 14:21 | gabrieljenik | Note Added: 72071 | |
2022-10-04 14:21 | gabrieljenik | Bug heat | 6 => 8 |
2022-10-21 14:43 | gabrieljenik | Assigned To | adamzammit => ollehar |
2022-10-21 14:43 | gabrieljenik | Status | ready for testing => ready for merge |
2022-10-24 00:23 | adamzammit | Note Added: 72381 | |
2022-10-24 15:44 | gabrieljenik | Note Added: 72390 | |
2022-11-02 11:23 | adamzammit | Changeset attached | => LimeSurvey 3.x-LTS 5f7a35a2 |
2022-11-02 11:23 | adamzammit | Note Added: 72510 | |
2022-11-02 11:23 | adamzammit | Assigned To | ollehar => adamzammit |
2022-11-02 11:23 | adamzammit | Resolution | open => fixed |
2022-11-07 11:36 | LimeBot | Note Added: 72587 | |
2022-11-07 11:36 | LimeBot | Status | ready for merge => closed |
2022-11-07 11:36 | LimeBot | Bug heat | 8 => 10 |
2022-11-07 13:59 | gabrieljenik | Status | closed => assigned |
2022-11-07 13:59 | gabrieljenik | Note Added: 72606 |