A way to check the answers of other respondents

More
1 year 5 days ago - 1 year 5 days ago #145875 by vkuzmin
vkuzmin created the topic: A way to check the answers of other respondents
I'm not sure, may be something like this already done in develop branch or may be i can do same things with new enforced quotas.
It's often necessary to know how many people gave a specific answer. Some answers should be unique (phone number for example), sometimes i need exact number (soft quotas. For example I need 100 men and 100 wimens, and at least 50 of them should love cats. To make my life easier As long as I do not get 50 positive responses I want to show a picture of a sad kitten and then stop to show it after that point).
2.5.* versions of Limesurvey cannot do that at all.
Right now I think to try to write a third-party php script which will work using jquerry and give the number of respondents in response to something like "332548X550X7179SQ001","Y".

May be someone did it already? Or maybe there is a plugin that can check the saved answers of other respondents? Something like {GETANSWERSCOUNT("Q1_SQ001","Y")} or {GETSGQANSWERSCOUNT("332548X550X7179SQ001","Y")} will be great!
For 1st example i need something like
(GETANSWERSCOUNT("PhoneNum",self)==0)
, for second one:
{(GETANSWERSCOUNT("Cats","Y)<50,"<img src=sadcat.jpg>","")}
Last Edit: 1 year 5 days ago by vkuzmin.

Please Log in to join the conversation.

More
1 year 4 days ago #145912 by DenisChenu
DenisChenu replied the topic: A way to check the answers of other respondents
Hi,

Currently:
- No included solution
- No plugin
- No events available for plugin

An event : (before|after)ValidateQuestion can do the trick i think : put e feature request.

Denis

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.

More
1 year 2 days ago #146045 by Joffm
Joffm replied the topic: A way to check the answers of other respondents
Hi, vkuzmin,

in your case I would recommend:
Instead of waiting for something in LS (I understand you would like to have it now), just write a small php script, which does the queries and displays the results.

Easy done.

Best regards
Joffm

Please Log in to join the conversation.

More
1 year 2 days ago #146046 by DenisChenu
DenisChenu replied the topic: A way to check the answers of other respondents
Oups, i see quota , and i think you want quota like something like this : allow only one 'phone number" etc .... see only 1.

For 2 , i have a plugin to do the job
framagit.org/SondagePro-LimeSurvey-plugi...lob/master/README.md

But not availbale currently for multiple choice.
If Cats is an answer to a single choice :
{if('[Q.nb.Cats]'<50,"<img src=sadcat.jpg>","")}

For the 1 : see only a javascript + ajax solution for example.

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.

More
11 months 2 weeks ago - 11 months 2 weeks ago #146439 by vkuzmin
vkuzmin replied the topic: A way to check the answers of other respondents
I'l make feature request later. I think i can do that myself. All i need is sql request like
$sql = "SELECT COUNT(*) FROM `lime_survey_".$sid"` where `lime_survey_".$sid"`.`".$SGQA"`='".$answer"'"
Last Edit: 11 months 2 weeks ago by vkuzmin.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!