- Posts: 85
- Thank you received: 9
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Create a plugin to query an External SQL and populate LS
- marcgold
- Topic Author
- Offline
- Premium Member
Less
More
5 years 1 month ago #181811
by marcgold
Create a plugin to query an External SQL and populate LS was created 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
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
The topic has been locked.
- gabrieljenik
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 272
- Thank you received: 45
5 years 1 month ago #181830
by gabrieljenik
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
Replied by gabrieljenik on topic Create a plugin to query an External SQL and populate LS
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
5 years 1 month ago - 5 years 1 month ago #181839
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 Create a plugin to query an External SQL and populate LS
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
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 , plugin development .
I don't answer to private message.
Last edit: 5 years 1 month ago by DenisChenu. Reason: Then : no need to construct something in Limesurvey.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 1 month ago #181841
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Create a plugin to query an External SQL and populate LS
You state:
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
Isn't that a contradict to this statement:DenisChenu wrote: I think the best things is creating a plugin for Joomla
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
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
5 years 1 month ago #181844
by DenisChenu
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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Create a plugin to query an External SQL and populate LS
Totally rightjelo wrote: You state:
Isn't that a contradict to this statement:DenisChenu wrote: I think the best things is creating a plugin for Joomla
DenisChenu wrote: Then : no need to construct something in joomla.
No need to construct something in Joomla except writing a joomla plugin?
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 , plugin development .
I don't answer to private message.
The topic has been locked.
- marcgold
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 85
- Thank you received: 9
5 years 1 month ago #181846
by marcgold
Replied by marcgold on topic Create a plugin to query an External SQL and populate LS
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
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
The topic has been locked.