Create a plugin to query an External SQL and populate LS

More
6 days 8 hours ago #181811 by marcgold
Hi Everyone,

Wondering if the following is possible and looking for someone to code this for us if it is.

Background:
We currently have a Joomla / Community builder website and multiple times a day invite users to complete online surveys via Limesurvey. All applications are latest versions. We currently pass one variable within the URL using LS approved method but are getting a fair number of complaints that they are having to retype information we already hold.

Uploading people to the participants table is not viable as we attract 30 - 50 new registrations per day.

Our LS survey always starts with the same 9 questions, which we already hold the answers too in Joomla / CB.

Is this Possible?
We would like to build a plugin, so that its update proof as much as possible.

We can then send a single encrypted Unique identifier with the URL to LS
The plugin should receive that variable and then query the Joomla / CB data is someway (maybe Direct SQL as they are on the same box) and then populate the relevant fields for the survey being completed.

I am far from being a competent programmer and this is just beyond my capabilities - so would be more than happy to engage a programmer to undertake this. As it would seriously save my users time and make sending surveys much simpler.

Any recommendations warmly welcome.

Thanks in advance.

Marc Gold
iPoint Research

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
5 days 19 hours ago #181830 by gabrieljenik
Hi Marc,

Would you like to contact me at www.encuesta.biz so we can review an approach?

Thanks!

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]

Please Log in or Create an account to join the conversation.

More
5 days 15 hours ago - 5 days 11 hours ago #181839 by DenisChenu
I think the best things is creating a plugin for Joomla using manual.limesurvey.org/RemoteControl_2_API

1. In joomla : create the participant in the survey : api.limesurvey.org/classes/remotecontrol...hod_add_participants
2. You get in return the participant information with the token
3. Use the survey id and the token to construct the url (always same, just update token value).
4. redirect or show it in joomla.

Then : no need to construct something in Limesurvey.
If joomla need information about the response : api.limesurvey.org/classes/remotecontrol...t_responses_by_token

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 .
Last edit: 5 days 11 hours ago by DenisChenu. Reason: Then : no need to construct something in Limesurvey.

Please Log in or Create an account to join the conversation.

More
5 days 14 hours ago #181841 by jelo
You state:

DenisChenu wrote: I think the best things is creating a plugin for Joomla

Isn't that a contradict to this statement:

DenisChenu wrote: Then : no need to construct something in joomla.


No need to construct something in Joomla except writing a joomla plugin?

The main database is in Joomla. Respondent login and and can change data.
www.i-point.co.uk/cb-registration/registers

When conducting a study it quite normal to ask these questions again, since the profile might have changed and people mostly don't update the profile till they get a study invitation.

Joomla (AnswersProfile) -> Joomla (UpdateAnswersProfile) -> LimeSurvey (not asking for Profile) -> Joomla (NoUpdate)

Joomla (AnswersProfile) -> LimeSurvey (Prefill AnswersProfile) -> Joomla (UpdateProfile)

I would try to ask the profile questions inside Joomla and then redirect to LimeSurvey with just an id or token.

The technical debt (e.g. update issues) with another plugin on any side will be much higher.
The site runs Joomla 3.9.2. What LimeSurvey version is currently used?

I'm quite amazed that Marc go this amount of studies running via a Joomla Frontend.

Beside remote api a feature / plugin which does webhooks via POST and GET. E.g. like this: help.surveygizmo.com/help/survey-webhook

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
5 days 11 hours ago #181844 by DenisChenu

jelo wrote: You state:

DenisChenu wrote: I think the best things is creating a plugin for Joomla

Isn't that a contradict to this statement:

DenisChenu wrote: Then : no need to construct something in joomla.


No need to construct something in Joomla except writing a joomla plugin?

Totally right :)

I mean : no mean to do something in Limesurvey :)

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 or Create an account to join the conversation.

More
5 days 9 hours ago #181846 by marcgold
Thanks Denis & Jelo

Thanks for the responses.

Some excellent suggestions and i'm in agreement that actually it may be better to write a Joomla plugin and send the data needed via the LS api remotecontrol.

>>Jelo, Joomla is actually 3.9.4 and LS is 3.16.1 - as mentioned always latest version - we maintain a 48 hr test and upgrade cycle for new versions.

Not 100% certain that I want to enable the tokens on every survey, but not a big issue if this is the only way.

Thanks that you're impressed we run so many in a Joomla front end, but its not really that complex.

I agree that asking / updating the user profile would seem sensible but there are some logical reasons why you would not want to do this directly, however i cannot discuss this in open forum.

Are there any suggestions for developers that could assist with this approach, im still thinking a LS specialist as lead would be best.

Thanks
Marc

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!