Responses import with validation (data consistency)

More
1 month 6 days ago #159596 by palfus
palfus created the topic: Responses import with validation (data consistency)
Hello,

I'm working on a survey response import feature from an XML file, and I intend to use the RemoteControl 2 API add_response method.
But this method does not perform any validation / survey logic checking, basically it's just a wrapper for the SurveyDynamic model.

So I need some tech advices on how to build this feature, how to leverage the Expression Manager in exactly the same way that it is when responding the survey from the GUI, to enforce data consistency.

PS : I'm totally new to LimeSurvey development (but I have good PHP skills however), I just read the LS manual (especially manual.limesurvey.org/Expression_Manager_for_developers ) and took a look at the code base for now.

Thanks

Please Log in to join the conversation.

More
1 month 6 days ago #159598 by LouisGac
LouisGac replied the topic: Responses import with validation (data consistency)
welcome to LimeSurvey

If you have some good PHP skills, I'd suggest you update directly the RC2 in the develop branch:
github.com/LimeSurvey/LimeSurvey/blob/de...tecontrol_handle.php

Please Log in to join the conversation.

More
1 month 5 days ago #159602 by palfus
palfus replied the topic: Responses import with validation (data consistency)
I'm OK to contribute, but I have still no idea of how to code this feature.

Please Log in to join the conversation.

More
1 month 5 days ago #159603 by LouisGac
LouisGac replied the topic: Responses import with validation (data consistency)
you can have a look to the code to import a survey from backend:
github.com/LimeSurvey/LimeSurvey/blob/ma...port_helper.php#L722

Please Log in to join the conversation.

More
1 month 5 days ago #159644 by DenisChenu
DenisChenu replied the topic: Responses import with validation (data consistency)
I think you better look at :
github.com/LimeSurvey/LimeSurvey/blob/12...ntimeHelper.php#L613
Because with index 2, wez revalidate whole survey before submit.

Here : github.com/LimeSurvey/LimeSurvey/blob/12...ger_helper.php#L5856

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!