View Issue Details

IDProjectCategoryView StatusLast Update
15539Bug reports[All Projects] Import/Exportpublic2019-11-14 21:23
ReporterApouxx Assigned Tocdorin  
PrioritynoneSeverityblock 
Status assignedResolutionopen 
Product Version4.0.0-RC6 
Target VersionFixed in Version 
Summary15539: queXML PDF shows JS script
Description

The queXML PDF format shows the embedded JS script at the exported file.

Link to survey : https://survey.devformation.fr/index.php/599988?lang=fr

TagsNo tags attached.
Complete LimeSurvey version number (& build)4.0.0-RC6 (191022)
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionphpMyAdmin MySQL libmysql - mysqlnd 5.0.11-dev
Server OS (if known)
Webserver software & version (if known)
PHP Version 5.6.40-12+ubuntu18.04.1+deb.sury.org+1

Activities

Apouxx

Apouxx

2019-11-06 11:14

reporter  

Screen Shot 11-06-19 at 10.23 AM.PNG (101,141 bytes)
DenisChenu

DenisChenu

2019-11-06 12:02

developer   ~54423

In my opinion : no need «Signature question with OfflineSurvey», just add

<script>
// This must be hidden in all print part
</script>
Apouxx

Apouxx

2019-11-06 14:12

reporter   ~54427

Sorry i dont understand... Where do i have to add this ?

Apouxx

Apouxx

2019-11-06 14:14

reporter   ~54428

Je dois ajouter script entre qui et quoi ?

DenisChenu

DenisChenu

2019-11-06 14:54

developer   ~54430

No, i mean : the issue is not related to OfflineSurvey
Seems related to HTML not filtered

See the attache survey + queXML

DenisChenu

DenisChenu

2019-11-06 14:54

developer  

limesurvey_survey_queXmlPrintScript.lss (22,030 bytes)
DenisChenu

DenisChenu

2019-11-06 14:55

developer   ~54431

Framadrop link
Up to 4 Mo for a pdf 8=|
Expiration : vendredi 6 décembre 2019 14:55

https://framadrop.org/r/z50lIFF5ZB#7TqWDkG4HosZgKlRVFgfYKJeH2CIS3UKjxF9fcVJEuY=

Apouxx

Apouxx

2019-11-06 15:26

reporter   ~54432

Ah I see... So what is the solution to export the photo and not the script itself ?

I tried with the HTML or PDF export, it shows what's in the database such as : "[{"title":"","comment":"","filename"...etc..."}] !

The problem occurs as well in the answers recap ON LS when i try to download the photo "Sorry, this file has not been found."

Mazi

Mazi

2019-11-07 08:06

partner   ~54453

Apouxx, we are talking about two different issues here:

  1. The queXML export shows included JavaScript -> it should be filtered. This has to be fixed within Limesurvey.

  2. Uploaded files from OfflineSurveys may not be linked at the response overview properly. Question is: Did you also enter FTP connection details at OfflineSurveys so the file gets transferred from your Android device?
    If so, please get in touch with support@offlinesurveys.com so they can have a look at what goes wrong. They may need to have a look at your system so please provide credentials when emailing them.

Apouxx

Apouxx

2019-11-07 09:00

reporter   ~54454

Hi Mazi,

I've contacted the "support@offlinesurveys.com" yesterday, still waiting for a response from them !

Apouxx

Apouxx

2019-11-07 09:29

reporter   ~54455

I think the Upload files from OfflineSurveys is the problem :

1.The files are stocked directly in /surveyid/files/, aren't they supposed to be in /upload/surveys/surveyid/files ?

  1. They are saved without any extension, just a random file without png behind....


image.png (8,817 bytes)
image.png (8,817 bytes)
image-2.png (8,628 bytes)
image-2.png (8,628 bytes)
Mazi

Mazi

2019-11-07 11:11

partner   ~54458

@1: Yes, they should be within the /upload/ folder. Please check if your FTP account maybe points to the wrong location.

@2: If I remember correctly, that is intended for security reasons so you can grab a file from the outside by e.g. guessing a file name. Limesurvey usually maps those cryptic file names with the real names internally.

Apouxx

Apouxx

2019-11-07 16:00

reporter   ~54466

Was that for the folder problem mazi, i change the root file location and i goes all good, but still cant find how to export those photos as pdf or even html... still i dont understand why the photo isnt stocked in the database.. at it's place there's [{"title":"","comment":"","filename"...etc..."}] i guess it allows the LS interface to read it... but cant read it when exporting it !

Any ideas ? still waiting for a response of offlineSurvey's support.

Apouxx

Apouxx

2019-11-12 10:58

reporter   ~54535

https://survey.devformation.fr/index.php/521936?lang=fr

Easier to test then the first one... still cant find a solution

Mazi

Mazi

2019-11-12 11:08

partner   ~54536

The upload question type used for storing photos can't embed files at any of the export formats since you never know what format an uploaded file may have (png, txt, pdf, ...).
That's why you can download the uploaded files at the response overview screen of Limesurvey.

Apouxx

Apouxx

2019-11-12 11:14

reporter   ~54537

I see, that was the point of all this but if u say it's not possible...

The question i was asking myself now is "How can i know easily which photo is attached to which response ?"

Not easy, if not by doing it manually on each answer, I can't see any other way of doing it... It this way can take quite a long time if we have like 100 responses !

Am i right ?

Mazi

Mazi

2019-11-12 11:20

partner   ~54538

What would be your preferred solution? Maybe you can outline 2-3 approaches that could work for you?

Apouxx

Apouxx

2019-11-12 11:28

reporter   ~54539

I'm watching at : https://manual.limesurvey.org/Development_-_File_Upload_question_type

make sure to identify easily a photo attached to a specific response :

As an example :

1 person is filling out the survey : He signs his answer with the signature question and sends it.
Maybe do something like put his name or something in the name's photo ? So when i export the zip with all the photo's responses, i can easily identify which signature is his .

Do you follow what i'm trying to say ?

I dont rly know how to do this, but maybe changing the way the photo's name is built ?

DenisChenu

DenisChenu

2019-11-12 11:46

developer   ~54540

@Mazi : maybe signature must be set to a long text question ?
It's the reason why i use a long text question for https://gitlab.com/SondagesPro/ExportAndStats/generateGraphQuestion
In 4.X : you can create your own ExpressionManager function : displayUploadFile(qid,index) for example :)

But : all of this is totally unrelated of this issue … plugin feature OR LimeSurfvey feature … but not an issue.

Mazi

Mazi

2019-11-12 11:59

partner   ~54541

Apouxx, the mentioned approach won't work. Technically it is tricky and it is also a very special requirement.

Is the name stored at the meta data of the file?

The only solution I can think of is a plugin which checks all responses, grabs the uploaded file for each response and stores the image with a new file name including the name as a ZIP file you can then download.
But this needs to be coded.

Apouxx

Apouxx

2019-11-12 14:12

reporter   ~54547

Hmm... I see. I'll try to code smthg myself then...

Mazi

Mazi

2019-11-12 14:29

partner   ~54548

I have updated the ticket since the actual bug is the JS shown with the export file/PDF.

@cdorin, tested and confirmed, please assign.

Issue History

Date Modified Username Field Change
2019-11-06 11:14 Apouxx New Issue
2019-11-06 11:14 Apouxx File Added: Screen Shot 11-06-19 at 10.23 AM.PNG
2019-11-06 12:02 DenisChenu Note Added: 54423
2019-11-06 14:12 Apouxx Note Added: 54427
2019-11-06 14:14 Apouxx Note Added: 54428
2019-11-06 14:54 DenisChenu Note Added: 54430
2019-11-06 14:54 DenisChenu File Added: limesurvey_survey_queXmlPrintScript.lss
2019-11-06 14:55 DenisChenu Note Added: 54431
2019-11-06 15:26 Apouxx Note Added: 54432
2019-11-07 08:06 Mazi Note Added: 54453
2019-11-07 09:00 Apouxx Note Added: 54454
2019-11-07 09:29 Apouxx File Added: image.png
2019-11-07 09:29 Apouxx File Added: image-2.png
2019-11-07 09:29 Apouxx Note Added: 54455
2019-11-07 11:11 Mazi Note Added: 54458
2019-11-07 16:00 Apouxx Note Added: 54466
2019-11-12 10:58 Apouxx Note Added: 54535
2019-11-12 11:08 Mazi Note Added: 54536
2019-11-12 11:14 Apouxx Note Added: 54537
2019-11-12 11:20 Mazi Note Added: 54538
2019-11-12 11:28 Apouxx Note Added: 54539
2019-11-12 11:46 DenisChenu Note Added: 54540
2019-11-12 11:59 Mazi Note Added: 54541
2019-11-12 14:12 Apouxx Note Added: 54547
2019-11-12 14:29 Mazi Summary queXML PDF and Signature question with OfflineSurvey => queXML PDF shows JS script
2019-11-12 14:29 Mazi Description Updated View Revisions
2019-11-12 14:29 Mazi Note Added: 54548
2019-11-14 21:23 cdorin Assigned To => cdorin
2019-11-14 21:23 cdorin Status new => assigned