Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Script that runs after survey completion

1 year 11 months ago #214932 by oledole

In our limesurvey system we currently have a process that is supposed to run after each reply to a survey. This is done as a plugin which run a certain script after survey completion event. This script gets the attachments and some other files (using a PDFreport plugin) and send them to a certain storage we have through API request.

One issue we're having right now is that the behaviour is a bit inconcistent when users are finishing their survey. For some users some users sees certain files (attachment files that we get from limesurvey) not appearing, while other sees multiple copies of all files.

Of course this isn't neccecarily an issue with limesurvey, but I wanted to figure out how to debug to see if it is. Is there anyone that knows what could cause issues such as this? E.g could the "survey finished" event run multiple times for some reason? Or could getting attachment fail or take a while before it works?

I would like to provide anything that might be useful to identify or debug this problem but I'm not sure what. I don't know what logs might be relevant here. Is there some log for events that run? Or for successful or failed API requests to limesurvey? Something I can provide to help this?

Thanks in advance for any help. I'm on Ubuntu 18.04 with Apache2.4.34 and php.7.2. Limesurvey Version 3.17.3+190429.
The topic has been locked.
1 year 11 months ago - 1 year 11 months ago #214943 by DenisChenu
My opinion
Need to log what happen

You can add in your own plugin : gitlab.com/SondagesPro/ExportAndStats/pd...r/pdfReport.php#L569

And log it where you want : manual.limesurvey.org/Optional_settings#Logging_settings

For example:
                    'pluginWeb' => array(
                        'class' => 'CFileLogRoute',
                        'levels' => 'info, warning, error',

I move this topic to Developement (already in dev)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 1 year 11 months ago by DenisChenu. Reason: (already in dev)
The topic has been locked.
1 year 11 months ago #214957 by oledole
Thanks. Okay, I will try to implement this log and see if I can get anything. Then I'll come back with this log and any thoughts I have.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose