Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all 17529 articles
Browse latest View live

automatically add long text answer to the next ranking question - by: tpartner

$
0
0
Not directly as there is no answer relevance for ranking questions.

Assuming that the short-text is on a preceding page, you can apply this workaround which uses an array-filter in the ranking question.

1) Directly after the short-text, add a multiple-choice question (code filter1) with a single sub-question (code q1).

2) Assign a CSS class "hidden" to that question.

3) Directly after the multiple-choice, add an equation question with this expression. It will toggle the hidden check-box if there is a value in the short-text.


4) Assign a CSS class "hidden" to the equation question.

5) Add an answer option (code q1) to your ranking question with this as the label (assuming Q1 is the question code for the short-text).


6) Apply an array-filter to your ranking question based on the hidden check-box question (code filter1).


Sample survey attached:

File Attachment:

File Name: limesurvey_survey_8817142_2020-02-12.lss
File Size: 32 KB

Setting a hidden radio button based on previous question - by: holch

$
0
0
Can you upload a small sample of your survey with just the relevant questions.

But the equation looks wrong to me.

I think you need to do something like {if(S4.NAOK==4 OR 5 OR 6 OR 8, hidSEG=1, hidSEG=2)}

Not tested, not sure it works, but I think the structure must be like this rather different.

Let's see if Tpartner, Joffm or Denis can come up with a working example.

If you send the sample survey, I might play around a bit when I find the time. But I am pretty sure the equation is wrong.

Setting a hidden radio button based on previous question - by: holch

$
0
0

The expression in your first post is the correct format and does work except that in your equation question it is wrapped in a <p> element so it would be good to remove that.

Thank you for clarifying, Tony!

Separate Send from and Reply to email addresses - by: kclingerman

$
0
0
The quick hacky way to accomplish this was(in v4) to edit limesurvey/application/core/LimeMailer.php and add this line below line 219(as of 2/13/2020):



Line 219 contains this:

in case anyone needs this in the future and the file has changed so line numbers aren't the same.

Obviously this will add the header to any emails sent from LimeSurvey so comment it out when you aren't using it.

Separate Send from and Reply to email addresses - by: DenisChenu

$
0
0

kclingerman wrote: ....
in case anyone needs this in the future and the file has changed so line numbers aren't the same.
...

Totally silly and stupid to update LimeSurvey core when a plugin can be really easy to do ...

You have sample here : github.com/LimeSurvey/LimeSurvey/tree/ma...ins/mailSenderToFrom

In function beforeEmail, just add
And it's done ....

Multiple short text: post-text for every subquestion - by: surveySn

$
0
0
Hi Tpartner

It doesn't work,
3.21.1+191210
bootswatch and fruity

Multiple short text: post-text for every subquestion - by: surveySn

Separate Send from and Reply to email addresses - by: holch

$
0
0
Denis, not everyone is as firm with the plugin system for Limesurvey as you are.

kclingerman needed a quick solution and this is what he found. Might there be a better solution? Obviously, as you have shown. But we should be happy that he was giving back to the community, most people here are only taking.

Separate Send from and Reply to email addresses - by: DenisChenu

$
0
0

holch wrote: Denis, not everyone is as firm with the plugin system for Limesurvey as you are.

kclingerman needed a quick solution and this is what he found. Might there be a better solution? Obviously, as you have shown. But we should be happy that he was giving back to the community, most people here are only taking.

Updating LimeSurvey core are always a bad solution.

And here : there are sample clear and easy to adapt.

LimeMailer : 799 lines
mailSenderToFrom : 48 lines

We have an extandable system : we must give good advice on forum not broken advice ... that potentially broke update ...

Survey templates - by: holch

$
0
0
No, Limesurvey does not deliver standard templates for specific uses. To be honest, I also do not find such a feature as very helpful. Every company is different and I wouldn't apply a solution "one fits all".

Limesurvey is a survey software, not a market research consultant. ;-)

Separate Send from and Reply to email addresses - by: DenisChenu

$
0
0
No, @kclingerman : @holch have right. Maybe I was right on the substance, but clearly not on the form.

Otherwise: I criticize the method, not the person. It also happens to me to write stupid and silly things.

For the plugin :
Start with mailSenderToFrom : update it in a new directory inside ./plugins

mailAnswerTo, rename the php file to mailAnswerTo.php
find mailSenderToFrom in the php file to mailAnswerTo, same in config file.

Remove the code here:
github.com/LimeSurvey/LimeSurvey/blob/d6...erToFrom.php#L40-L45

And replace by (for example)

$limeMailer->AddReplyTo(App()->getConfig('siteadminemail'));

Database Query - by: christianlangkamp

$
0
0
So how do you connect directly from powerquery to Limesurvey ? Are you on the hosted version or do you have your own instance ?

Query the hosted LimeSurvey sql database - by: Joffm

$
0
0
Hi,
here is an API script to get the entire survey data.
<?php
 
require_once 'jsonrpcphp/JsonRPCClient.php';
 
define( 'LS_BASEURL', 'https://www.example.com/survey');  // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'myUserName' );
define( 'LS_PASSWORD', 'myPassword' );
 
// the survey to process
$survey_id=mySurvey_ID;
 
// instantiate a new client
$myJSONRPCClient = new \org\jsonrpcphp\JsonRPCClient( LS_BASEURL.'/index.php/admin/remotecontrol' );
 
// receive session key
$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );
 
if(is_array($sessionKey))
{
    header("Content-type: application/json");
    echo json_encode($sessionKey);
    die();
}
 
/* Get the responses */
$response = $myJSONRPCClient->export_responses(
    $sessionKey,
    $survey_id,
    'json', // Document type : pdf,csv,xls,doc,json
    null, // Language code : null : default from survey
    'complete', // Stautus complete|incomplete|all
    NULL, // Heading : code|full|abbreviated : question text, default code
    'short', // answer : short|long , default : long
    2,  // First exported SAVEDID   or NULL
    3  // Last exported SAVEDID   or NULL
    ); 
 
$decodedString = base64_decode($response);
$aResponses = json_decode($decodedString, True);
 
// Find the first response ID
$aFirstResponse = reset($aResponses['responses'][0]);
 
echo '<table style="border-collapse: collapse; text-align: left;">';
echo '<tr>';
// Insert column headers
foreach($aFirstResponse as $key => $value) {
	echo '<th style="border: 1px solid #CCC; padding: 2px 7px;">'.$key .'</th>';
}
echo '</tr>';
 
foreach($aResponses['responses'] as $key => $row) {
//echo "Key: ".$key."  Row: ".$row;
	echo '<tr>';
	// Insert the data
	foreach(reset($row) as $key => $item) {
 		echo '<td style="border: 1px solid #CCC; padding: 2px 7px;">'.$item .'</td>';
	}
	echo '</tr>';
				}
echo '</table>';
 
 
 
// release the session key
$myJSONRPCClient->release_session_key( $sessionKey );
 
 
?>

See here:
https://api.limesurvey.org/classes/remotecontrol_handle.html#method_export_responses




Joffm


Or you do it with direct access in php.
It is not to difficult to include a mapping table (SGQA-Codes -> question text)

And it's always better to open a new thread than to continue such an old one.
I am really sure Jjamison0221 is looking into the forum and will not be able to answer your question.

Database Query - by: rbernhardthki

$
0
0
Sorry, what do you mean by that?

We host a version of Limesurvey on www.limesurvey.Contoso.com .

To get reports, I connect directly to the SQL database either from Excel or Power BI.

Separate Send from and Reply to email addresses - by: kclingerman

$
0
0
Hey Denis,

I need some advice on this, I am having a lot of trouble with object oriented php lol. In the below plugin storing the plugin settings is fine, but I don't know how to get that into the $limeMailer->AddReplyTo function. Can you please let me know what I am doing wrong?

Thank you!


Change List with comment lable - by: Joffm

$
0
0
Hi, Blocka,
that was the solution I knew that I had it somewhere but didn't find it.

Joffm

Query the hosted LimeSurvey sql database - by: christianlangkamp

$
0
0
I am in the hosted Limesurvey one. The commercial package so to speak.

At the moment once a week I go in and download a CSV. That is OK for now, but a bit of a nuisance.

But it would be so much more convenient to be able to just use a SQL Query node in KNIME or so and just click the update button...

Exclude Expression manager 'Questions' from Question Count - by: DenisChenu

$
0
0
Easy way : disable this in Survey option, and show your own count.

Generate completion code for Amazon Turk - by: MAhama

$
0
0
Hello All, thanks for your help.

I read most of the forum entries and I came up with a solution for a situation where the survey is public (no participant list) and you want to use it with MTurk (you need a unique 6 digit code at the end for each pariticipant). I am planning on having 200 assignments/workers for my survey.

I would appreciate if you could give your comments to my solution, maybe there is an error I do not see.

I use the question type "equation", give it the name PIN, and hide it.
The code I post in the question section is the following:

{rand(100, 999)}{if(strlen(SAVEDID) < 3, 0, '')}{if(strlen(SAVEDID) < 2, 0, '')}{SAVEDID}

This allows for a participant ID up to 3 digits but puts a random 3 digit number in the front.

Thanks for your comments.

Best,
Max

Database Query - by: jelo

$
0
0

christianlangkamp wrote: So my question is, I don't want to get into hosting myself, but it would be really sweet to be able to connect to the Limesurvey data like you would connect to an SQL Database.


Contoso.com is used in Microsoft Docs as a placeholder for your own domain.

rbernhardthki can connect directly to the database cause it's not a SaaS hosting via LimeSurvey.org.

It makes so sense to post in every thread here. No customers of LimeSurvey.org Hosting can access the database directly via SQL. The only interface is the RemoteControl API.

Focus on one thread:
www.limesurvey.org/forum/can-i-do-this-w...esurvey-sql-database
Viewing all 17529 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>