- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to check if a survey's has new or modified responses - programmatically?
- ngwulee
- Topic Author
- Offline
- New Member
Less
More
3 years 6 months ago #205947
by ngwulee
How to check if a survey's has new or modified responses - programmatically? was created by ngwulee
So we use the remote control API to download survey responses and transform them into a map (amongst other things).
The problem we have is that this process can't tell when it needs to run. We have to poll the survey server, and even then can't tell if the server has response data which need processing. So we process the whole lot every time.
This is not ideal. I've been looking for something in the API, or even the web UI, which can short-cut this process, and give us a list of response IDs which should be re-processed because they are either new, or modified. So far without success.
Can anyone suggest a way to do this?
Thanks!
The problem we have is that this process can't tell when it needs to run. We have to poll the survey server, and even then can't tell if the server has response data which need processing. So we process the whole lot every time.
This is not ideal. I've been looking for something in the API, or even the web UI, which can short-cut this process, and give us a list of response IDs which should be re-processed because they are either new, or modified. So far without success.
Can anyone suggest a way to do this?
Thanks!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
3 years 6 months ago #205966
by DenisChenu
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.
Replied by DenisChenu on topic How to check if a survey's has new or modified responses - programmatically?
In
api.limesurvey.org/classes/remotecontrol...hod_export_responses
you have a variable : $iFromResponseID ,
Then if you already get until 1000 for id, you can set this var to 1000 the next time.
Need to keep current value in your tool.
you have a variable : $iFromResponseID ,
Then if you already get until 1000 for id, you can set this var to 1000 the next time.
Need to keep current value in your tool.
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.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 6 months ago #205983
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to check if a survey's has new or modified responses - programmatically?
Or, use the API to record that in another "control" survey.Need to keep current value in your tool.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- ngwulee
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
3 years 6 months ago #205985
by ngwulee
Replied by ngwulee on topic How to check if a survey's has new or modified responses - programmatically?
Thanks for the suggestion.
However, the responses sometimes get modified after their initial creation by an administrator or (possibly) the original user. I don't think this method would spot those changes would it?
However, the responses sometimes get modified after their initial creation by an administrator or (possibly) the original user. I don't think this method would spot those changes would it?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
3 years 6 months ago #206002
by DenisChenu
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.
Replied by DenisChenu on topic How to check if a survey's has new or modified responses - programmatically?
Use afterSurveyComplete event :
manual.limesurvey.org/AfterSurveyComplete
to send the id to your tool.
to send the id to your tool.
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.
The topic has been locked.
- ngwulee
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
3 years 6 months ago #206006
by ngwulee
Replied by ngwulee on topic How to check if a survey's has new or modified responses - programmatically?
Can the `afterSurveyComplete` event fire many times, once after each modification?
I would also guess this would need us to write a plug-in, is that correct?
I would also guess this would need us to write a plug-in, is that correct?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
3 years 6 months ago #206019
by DenisChenu
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.
Replied by DenisChenu on topic How to check if a survey's has new or modified responses - programmatically?
afterSurveyComplete : see the manual : when surey is submitted. Not when updated
An alterantive solution can be create you own API function.
See gitlab.com/SondagesPro/RemoteControl/ext...xportReponseFiltered for a sample.
An alterantive solution can be create you own API function.
See gitlab.com/SondagesPro/RemoteControl/ext...xportReponseFiltered for a sample.
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.
The topic has been locked.
- ngwulee
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
3 years 6 months ago #206046
by ngwulee
Replied by ngwulee on topic How to check if a survey's has new or modified responses - programmatically?
Thank you very much for your help.
We're not self-hosting our LimeSurvey instance (we're on limequery.com), so we don't have access to the source code, and nor can we install 3rd party plug-ins:
manual.limesurvey.org/Plugin_manager#How...ird-party_plugins.3F
Sadly none of the suggestions so far seem to be both possible (for us) and cover the cases we need, i.e. to indicate when responses are modified.
We're not self-hosting our LimeSurvey instance (we're on limequery.com), so we don't have access to the source code, and nor can we install 3rd party plug-ins:
manual.limesurvey.org/Plugin_manager#How...ird-party_plugins.3F
Sadly none of the suggestions so far seem to be both possible (for us) and cover the cases we need, i.e. to indicate when responses are modified.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
3 years 6 months ago #206048
by DenisChenu
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.
Replied by DenisChenu on topic How to check if a survey's has new or modified responses - programmatically?
Maybe you can contact limequery :
account.limesurvey.org/customer-support
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.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
3 years 6 months ago #206110
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic How to check if a survey's has new or modified responses - programmatically?
Why not use the end url to trigger your software to know that there have been changes?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 6 months ago #206112
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to check if a survey's has new or modified responses - programmatically?
Interesting idea but I don't think it covers the scenario where an admin updates the response in the back end.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
3 years 6 months ago #206113
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic How to check if a survey's has new or modified responses - programmatically?
Agreed, one would definitely need to reach the end of the survey to use this feature.Interesting idea but I don't think it covers the scenario where an admin updates the response in the back end.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.