View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
19185Bug reportsImport/Exportpublic2023-12-15 04:18
Reporterbaxterdmutt Assigned Toadamzammit  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version6.2.x 
Summary19185: QueXML PDF arrays print only 10 spaces
Description

When exporting a QueXML PDF all the “array text“ types only give space for 10 characters. The only way to increase those spaces is to hobble the online infput to maximum characters. Setting maximum characters to 20 then will print 10 spaces on the PDF but if online tries to enter more than 20 it’s prevented. Wouldn’t be best to allow setting the number on minimum spaces on the pdf be a useful thing to have.

Steps To Reproduce

Steps to reproduce

Create form with an array text type input. Then export to QueXML pdf

Expected result

I would expect a larger number of spaces than just 10

Actual result

Only 10 spaces are given and the only way to fix it is to set maximum characters to a larger number in the design.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)6.2.9+230925
I will donate to the project if issue is resolvedNo
BrowserAny
Database type & versionMaria
Server OS (if known)Debian 11
Webserver software & version (if known)
PHP Version8.0

Users monitoring this issue

There are no users monitoring this issue.

Activities

adamzammit

adamzammit

2023-10-24 05:21

developer   ~77896

Thanks @baxterdmutt.

The maximum chars was chosen as it was already a field for the array text type.

There are a few alternative solutions here:

  1. You can export to queXML, edit the queXML file, change the "format" of question to be "longtext" instead of text to get a field not limited to individual characters, then use the queXML Tools to generate the PDF
  2. Set the maximum chars to a limit that is right for both paper and online
  3. We could alter the default output format of LimeSurvey to queXML to be "longtext" for array text style questions

I'm not sure though if there are many other users that consider this an issue.

Are you able to try a suggested workaround for now and if there is some other interest in changing this default we can?

Adam

baxterdmutt

baxterdmutt

2023-10-24 18:23

reporter   ~77940

My view would be that 10 is quite short. There is a lot of room on an 8.5 x 11 sheet of paper.
Most other fields take the width of the sheet.10 char is really short. In my mind setting the maximum characters is backwards. It should be that the field has a minimum and maximum characters. But if you feel most don’t require this I can respect that.

Where is the QueXML file located and I’ll just change that as suggested. Seems the easiest way to fix this.

DenisChenu

DenisChenu

2023-10-25 17:19

developer   ~78001

@adamzammit : see https://gitlab.com/SondagesPro/QuestionTheme/arrayTextArea

I don't think we must have a multiple lines system, but clearly : you must allow more character by default. 10 is really low here.

Maybe adding a Question attribute via the plugin ?

baxterdmutt

baxterdmutt

2023-10-25 18:36

reporter   ~78007

I wouldn’t think a multi line field would be needed. A single line or most of it would be very useful.

DenisChenu

DenisChenu

2023-10-25 19:02

developer   ~78012

Maybe best solution is to create Question attribute where admin can choose some settings
For this one but maybe for other one too ?

adamzammit

adamzammit

2023-10-26 04:09

developer   ~78025

The queXML file is the .xml file inside the ZIP file when you export to queXMLPDF

You can edit it like a text file, then either install queXML to generate the PDF locally or use this website: https://quexmltools.acspri.org.au/quexml/ to produce the PDF based on the XML file.

@baxterdmutt Maybe have a play with that and let me know what you think a sensible default is and we can change it in LS

baxterdmutt

baxterdmutt

2023-10-27 00:30

reporter   ~78068

That absolutely will not work. First, there is more than one question like that.
More importantly my end users will not be up for that task.
Sorry.

DenisChenu

DenisChenu

2023-10-27 08:05

developer   ~78071

I think you don't understand Adam proposition : he ask you the good default option.
Testing to update XML, and see if there are a really better option (maybe 20 or 12 etc …)

baxterdmutt

baxterdmutt

2023-10-27 23:15

reporter   ~78110

Oh. Yes. I did misunderstand. I’m tied up on other stuff I might not get to this until tomorrow.

baxterdmutt

baxterdmutt

2023-10-31 18:21

reporter   ~78191

A complete line is 25 characters. Having the space automatically take up the whole line makes the most sense to me. I compared the length of a long survey (71 pdf pages) to 10 characters on a line vs. 25 char on a line. There are 30 array type fields. Because the last page was not completely filed, the length of the document changed very little. At 10 char per line the 71st page was 1/4 filed. At 25 characters per line, the 71st page was a bit less than 1/2 full. Not much of a change in such a big document. So it’s my suggestion that 25 characters as a default length makes the most sense. I still think it would also be nice to have a setting someplace that allowed the minimum length to be set on the pdf. It could be a nice way to satisfy everyone. Yes I know you can set the maximum and that will lengthen that field on the pdf but it also restricts the size on the web version. Consider this:
-You use the array to enter a complete address:
-maybe I’m wrong but I think the pdf version is mostly used if it’s not possible for someone to use the online survey. But I think most times the online survey is used.
-so everyone online has no restrictions on their field length. But the rarer pdf is restricted in length.
-so the issues of running out of space will only happen occasionally on the pdf version, but as it is now, the online version could run out of space regularly.
I don’t know if any of that makes sense to anyone else.

  • Rarely will you get a huge street.
adamzammit

adamzammit

2023-11-27 05:31

developer   ~78713

Apologies for the delayed reply.

I don't think there is much interest from other users in changing the default here.

It seems like you have a specific use case in mind.

In that case - I suggest you change the value of "10" in the code here:

https://github.com/LimeSurvey/LimeSurvey/blob/eb27f86043718396dd71bcbde31b898683114615/application/helpers/export_helper.php#L1842

on your copy of LimeSurvey with 25 or whatever you choose and that will be the default for your installation.

DenisChenu

DenisChenu

2023-11-27 08:32

developer   ~78714

Last edited: 2023-11-27 08:32

I don't think there is much interest from other users in changing the default here.

i don't understand this point of view  …

Else what's is your opinion on

Maybe best solution is to create Question attribute where admin can choose some settings
For this one but maybe for other one too ?

?

baxterdmutt

baxterdmutt

2023-12-02 19:40

reporter   ~78852

Well… I’m satisfied with that dolution for myself, if it had worked. I made the changes and the Multiple Sort Text fields remain at 10 when exported as QueXML PDF

adamzammit

adamzammit

2023-12-15 04:18

developer   ~78997

that code change will work for array text types.

If you want to alter the default for other types, please look here:

https://github.com/LimeSurvey/LimeSurvey/blob/40401b81b08a66ee97749c8686523788286fcac7/application/helpers/export_helper.php#L1942

https://github.com/LimeSurvey/LimeSurvey/blob/40401b81b08a66ee97749c8686523788286fcac7/application/helpers/export_helper.php#L1947

... etc

Issue History

Date Modified Username Field Change
2023-10-20 20:19 baxterdmutt New Issue
2023-10-24 05:10 adamzammit Assigned To => adamzammit
2023-10-24 05:10 adamzammit Status new => assigned
2023-10-24 05:21 adamzammit Note Added: 77896
2023-10-24 05:21 adamzammit Bug heat 0 => 2
2023-10-24 18:23 baxterdmutt Note Added: 77940
2023-10-24 18:23 baxterdmutt Bug heat 2 => 4
2023-10-25 17:19 DenisChenu Note Added: 78001
2023-10-25 17:19 DenisChenu Bug heat 4 => 6
2023-10-25 18:36 baxterdmutt Note Added: 78007
2023-10-25 19:02 DenisChenu Note Added: 78012
2023-10-26 04:09 adamzammit Note Added: 78025
2023-10-27 00:30 baxterdmutt Note Added: 78068
2023-10-27 08:05 DenisChenu Note Added: 78071
2023-10-27 23:15 baxterdmutt Note Added: 78110
2023-10-31 18:21 baxterdmutt Note Added: 78191
2023-11-27 05:31 adamzammit Note Added: 78713
2023-11-27 08:32 DenisChenu Note Added: 78714
2023-11-27 08:32 DenisChenu Note Edited: 78714
2023-12-02 19:40 baxterdmutt Note Added: 78852
2023-12-15 04:18 adamzammit Note Added: 78997