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

Prefilling value, variable type - by: Jmantysalo

$
0
0
Now I got this to work. I must use "attribute_1" when adding a participant throught API, but "{TOKEN:ATTRIBUTE_1}" when referring to the value. Not so nice feature, but anyways, now everything works.

Thanks to all.

Prefilling value, variable type - by: tpartner

$
0
0
The reason for this is that the api uses the database column name, whereas Expression Manager uses placeholders. All token placeholders are upper-case.

How to not use the same randnumber twice - by: tpartner

$
0
0
I don't know of a way to do it with Expression Manager but here is a JavaScript solution.

Create multiple-short-text question with two sub-questions.

Add this script to the source of that question. Adjust the "minNumber" and "maxNumber" variables as necessary. The script will create an array of possible numbers, randomize it and then load the first two numbers into the sub-questions. You can then base relevance on those sub-questions.

<script type="text/javascript" charset="utf-8">		
	$(document).on('ready pjax:scriptcomplete',function(){	
 
		// Identify this question
		var thisQuestion = $('#question{QID}');			
		var input1 = $('input:text:eq(0)', thisQuestion);
		var input2 = $('input:text:eq(1)', thisQuestion);
 
		// Define the minimum and maximum numbers
		var minNumber = 1;
		var maxNumber = 10;
 
		// Only load random numbers once
		if($.trim($(input1).val()) == '' && $.trim($(input2).val()) == '') {
 
			// Create an array of possible numbers
			var numbers = [];
			var i;
			for (i = minNumber; i <= maxNumber; i++) {
				numbers.push(i);
			}
 
			// Shuffle the numbers array
			shuffleArray(numbers)
 
			// Load the first sub-question with the first number
			$(input1).val(numbers[0]).trigger('keyup');
 
			// Load the second sub-question with the second number
			$(input2).val(numbers[1]).trigger('keyup');
		}
 
 
	});
 
	// A function to shuffle arrays
	function shuffleArray(array) {
		for (var i = array.length - 1; i > 0; i--) {
			var j = Math.floor(Math.random() * (i + 1));
			var temp = array[i];
			array[i] = array[j];
			array[j] = temp;
		}
		return array;
	}	
</script>

Sample survey attached:

File Attachment:

File Name: limesurvey_survey_8817143.lss
File Size: 19 KB

Questions not shown after equation is in question group - by: tpartner

$
0
0
I also think that this is working as expected.

In the first group, "counter" is set to 1 - this allows (via relevance) the second group and its questions to be shown. BUT, in the second group you have an equation question that immediately sets "counter" to 2, hiding both itself and the first question in that group.

In fact, if you look carefully, you can see a brief flash of those questions before they are hidden.

larissabruebach said: In this case shouldn't it work when I set the relevance equation to counter == 1 and then set the counter within the group to 1? As far as I can see it doesn't.

This also does work as far as I can see. If I change the equation question in the second group to "counter = 1", both questions are shown in that group.

Question about using tokens - by: holch

$
0
0
Or you could use the API for creating an entry in the token table for each person that is created in your webportal.

Reading possible choises from cvs file - by: tpartner

$
0
0
You can use Evan Plaice's jquery-csv platform to convert CSV contents into JavaScript objects.

I don't understand the need to access the first CSV file - couldn't the basic course be placed in a token attribute?

What question type do you see for the advanced course(s)? I ask because you can't arbitrarily generate answers for LimeSurvey. If using list-radio or multiple-choice questions, the answers/sub-questions must be defined in the LimeSurvey GUI.

Reading possible choises from cvs file - by: jelo

$
0
0

Jmantysalo wrote: Hmm... Can the token be handled like a string or number? If so, the token could be just of the form XXXYYYY where X-part would define possible choises and YYYY would be string to differentiate students.

Did you read about "Survey participants and attributes"? Your question implies that you haven't. If you like to code a workaround to decipher the token into choiceoptions, fine. But you can just place the numbers/codes into a attribute field and access the attribute field inside LimeSurvey.

List (Dropdown) responses - by: tpartner


List (Dropdown) responses - by: jelo

Interactive Bar Chart in LimeSurvey - by: BusyBonsai

$
0
0
Quick Update: This is put on ice now since the researcher wants to use another software than LS.

In case anyone has a solution spending low effort - e.g. because they have implemented it for themselves already - I'd still be interested for principals' sake (and possible LS surveys to come).

Best
Adam

Reading possible choises from cvs file - by: Jmantysalo

$
0
0

tpartner wrote: You can use Evan Plaice's jquery-csv platform to convert CSV contents into JavaScript objects.

Thanks. Seems usefull, I'll look at that.

I don't understand the need to access the first CSV file - couldn't the basic course be placed in a token attribute?


True, it can.
What question type do you see for the advanced course(s)? I ask because you can't arbitrarily generate answers for LimeSurvey. If using list-radio or multiple-choice questions, the answers/sub-questions must be defined in the LimeSurvey GUI.[/quote]

That has not been specified yet. Probably radio button choise or dropdown.

Reading possible choises from cvs file - by: holch

$
0
0

I think it could be easier that way.


I don't think so. What is easier to use the possibilties that LS offers out of the box?

With your approach you would have to have custom coding to break up the token into different bits, while with the approach Jelo highlights you can just create a token table with the necessary custom attributes in columns for each respondent. These custom attributes can be used within the survey, for expressions, relevance equations, etc. and are easily accessible with {TOKEN:ATTRIBUTE_1}

Which universities are using LimeSurvey? - by: bulent

$
0
0
Bilecik Şeyh Edebali Üniversitesi (Turkey) is using LimeSurvey.

Relevance equation for a question group based on multiple choice - by: rhaimila

$
0
0
Thank you!
This worked.

However: When I designed the questionnaire, I didn't realize that even if the participant sees QGroup2 ("Thank you for your interest") after not giving sufficient consent for the study in Consent1, QGroup2 will automatically have a "Next" button where the participant could still continue to the actual study. So I'll continue by looking for a way the participant would see a page that is not actually a part of the survey (or that will not have a Next button), after not giving sufficient consent in Consent1

Thank you for the great advice, though!

Best,
Roosa H

Reading possible choises from cvs file - by: DenisChenu


Send response pdf in email - by: rickanderson

$
0
0
Thanks for getting back to me Denis.

I returned to my original solution (as per above reply) using html2pdf.js to create the pdf as required (image overlays and landscape orientation) and tried to work out how to email the resulting client-side data URI string. I think I have now managed to convert the data URI string generated via html2pdf.js to a Blob which I send to a php file using ajax - the php file then uses LimeSurvey's phpmailer to send an email with the resulting PDF attached...still needs a little fine-tuning but seems to be providing all the functionality required.

Happy to go into more detail if anyone stumbles across this thread looking for similar functionality. Although I'm not sure that this the optimal solution as I said it seems to be working for me.

Meantime, thanks for all the help with this and to the team for the LimeSurvey app itself!

Show up Y Questions out Total X Number Question in a Question Group?? - by: Joffm

$
0
0
Hi,
this is explained many times here. And there are examples, too.

To display 5 out of 10 (or n out of m) you create two groups.
Set the second group to "hidden".
In the first group you insert 5 questions (or n), in the second (hidden) group the rest.
All questions have the same randomization group name.

Joffm

Relevance equation for a question group based on multiple choice - by: Joffm

$
0
0
What do want to happen if a respondent does not give consent?
IMO he is screened out. So you have to create a quota with limit 0.

Or you show the page and hide all following questions by relevance.
Meaning they are only displayed if all three options of "Consent" are checked.

A bit shorter:


Joffm

Send response pdf in email - by: DenisChenu

$
0
0
Oh right … you use a javascript solution with html2pdf … totally unrelated to plugin then :).
I'm sure some people can be interested , maybe in manual / workaround/javascript ?

Show up Y Questions out Total X Number Question in a Question Group?? - by: FrankyQuest

$
0
0
is there an option to make without creating two groups of questions, i want to make it within one group, because the total survey has already 20 groups, so if i had to create this thing it will take me another 20 groups.
thanks.
Viewing all 17529 articles
Browse latest View live


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