Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

One survey for different classes

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 3 months ago #128837 by tammo
Replied by tammo on topic One survey for different classes
When you export the results of a survey to SPSS, token values are also exported, so this "hidden question trick" is not necessary then.

When you export to Excel, you can indicate which attributes from the token table need to be included. So then the "hidden question trick" is also superfluous.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 3 months ago #128839 by AnnaBH
Replied by AnnaBH on topic One survey for different classes
I have no idea what SPSS is so that will have to wait for a while :D
The topic has been locked.
More
8 years 3 months ago #128859 by AnnaBH
Replied by AnnaBH on topic One survey for different classes
Ok. There is something I miss if I want to use Limeservice own diagrams. How do I do to get the answer on the hidden question? The question is there but I didn´t get any answers (because it is hidden). I guess it´s supposed to shown in some kind of "auto-magic" way? But how?
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar
  • Offline
  • Premium Member
  • Premium Member
More
8 years 3 months ago - 8 years 3 months ago #128864 by fransmarcelissen
Replied by fransmarcelissen on topic One survey for different classes
I agree with Tammo that the best approach is one survey with a hidden question. But if you know a tiny bit of R it is not necessary to export the date to a spss file: you can directly read the data from the limesurvey database into R (using rpc2) and analyse the data. This all takes less then 10 lines of code. An example is shown below. Her the following happens:
- Data are read by R from limesurvey
- Data are filtered (here: only males are selected)
- Analyse data (here as an example: create histogram of intelligence scores).
R is much more powerful (and if you know it: easier) then spss, especially the graphics.

library(limer)

options(lime_api = "" www.XXXXX.nl/index.php/admin/remotecontrol ")
options(lime_username = USERID)
options(lime_password = PASSWORD)

get_session_key( )
data = get_responses(iSurveyID = 123456, sLanguageCode = 'nl')
men = dplyr::filter(data,sex=='Male')
hist(men$intelligence)
Last edit: 8 years 3 months ago by fransmarcelissen.
The following user(s) said Thank You: AnnaBH
The topic has been locked.
More
8 years 3 months ago #128869 by AnnaBH
Replied by AnnaBH on topic One survey for different classes
Haha! Thank you guys but you think to much of my knowledge... I´m just an ordinary limesurveyuser ^^
I really think R looks lika a good idea. If I only knew it... I will see if I can get help from a friend.
But until I have that help it will have to do with limesurvey and maybe excel. So my biggest problem is still how I get the answer to the hidden question? I think I maybe have the answer for that in your LSS-file Tammo, but I can´t get it to work. I try to import it but it fails :/ So if you can describe in words what I must do or if you can help me how to import the file proparly?
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar
  • Offline
  • Premium Member
  • Premium Member
More
8 years 3 months ago #128870 by fransmarcelissen
Replied by fransmarcelissen on topic One survey for different classes
Which limesurvey version are you using? If it is 2.00: see www.limesurvey.org/en/community-services...index-is-not-defined In that case I would suggest to upgrade to a newer version.
But as Tammo mentioned before: you do'nt need the hidden question, if you export the attributes together with the answers.
Frans
The topic has been locked.
More
8 years 3 months ago #128871 by AnnaBH
Replied by AnnaBH on topic One survey for different classes
Ah. Ok. It´s 2.0. And here is my next problem. I have my LImeSurvey on my virtual server. It seems that I can´t update it in any ordinary way. There is no botton or text for "uptate". If I have to update it and then put it manually on my virtuel server again I think I have to see myself defeeted :/ At least for now. I will come back! Promise ;-)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #128872 by tpartner
Replied by tpartner on topic One survey for different classes

How do I do to get the answer on the hidden question? The question is there but I didn´t get any answers (because it is hidden). I guess it´s supposed to shown in some kind of "auto-magic" way? But how?


1) Set up your survey to use JavaScript .

2) Add a list-radio type question with answer codes that match the expected token ATTRIBUTE_1 values. Do not hide this question with the LimeSurvey setting - we'll do that with Javascript.

3) Insert this script in the source of the radio question:
Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function(){
 
    // Hide this question
    $('#question{QID}').hide();
 
    // Click the "ATTRIBUTE_1" radio
    $('#question{QID} input.radio[value="{TOKEN:ATTRIBUTE_1}"]').trigger('click');
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: AnnaBH
The topic has been locked.
More
8 years 3 months ago #128875 by AnnaBH
Replied by AnnaBH on topic One survey for different classes
Thank´s but I have to wait and try this as well. Can´t even find Global settings. I think I have to go for making different diagrams using the identification number this time. But I will learn! And update! Or I will get someone to help me fix that :)
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar
  • Offline
  • Premium Member
  • Premium Member
More
8 years 3 months ago #128878 by fransmarcelissen
Replied by fransmarcelissen on topic One survey for different classes
Hi Tony,
Why do you propose the javascripts solution and not the "hide always" setting? Imho this is exactly the situation where the "hide always" option is created for. I see javascript as something for things that can not be done in limesurvey.
To be clear: I am referring to "hide always" and not to the relevance. I know that if relevance is zero, the question is not neglected. But a hidden question _is_ evaluated.
Frans
The topic has been locked.
More
8 years 3 months ago #128879 by AnnaBH
Replied by AnnaBH on topic One survey for different classes
Maybe you can tell me how I do to get answers to my hidden question? I think it would work like a charm if it only worked but if I make attribute_1 to a question I only get an emty field when I look at the answers.
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar
  • Offline
  • Premium Member
  • Premium Member
More
8 years 3 months ago - 8 years 3 months ago #128880 by fransmarcelissen
Replied by fransmarcelissen on topic One survey for different classes
You do not really need a hidden question here, as Tammo mentioned before. You can export the attributes and filter on this attribute in excel. But Often hidden questions are handy.
If you want to make a hidden question referring to an attribute: there are several options.
1 Tammo already suggested to create an equation. Then set the question text to {TOKEN:ATTRIBUTE_1} (if this is the correct attribute).
2 I always do it in anouther way. Create a short text question. Then click on edit default values for this question. Set the default value to {TOKEN:ATTRIBUTE_1}
The first option has the effect that the value changes if the attribute changes. In general the attribute does not change. In the second option the question gets a value only once, and this value stays the same as long as you don't edit it.
In both cases: edit the question. Click on Show advanced settings. In the group: Display: set Always hide this question to "yes"

Frans (DigiPsy)
Last edit: 8 years 3 months ago by fransmarcelissen.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose