Welcome to the LimeSurvey Community Forum

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

Responses import with validation (data consistency)

  • palfus
  • palfus's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #159596 by palfus
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
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 6 months ago #159598 by LouisGac
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
The topic has been locked.
  • palfus
  • palfus's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #159602 by palfus
I'm OK to contribute, but I have still no idea of how to code this feature.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 6 months ago #159603 by LouisGac
you can have a look to the code to import a survey from backend:
github.com/LimeSurvey/LimeSurvey/blob/ma...port_helper.php#L722
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #159644 by DenisChenu
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 , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose