Welcome to the LimeSurvey Community Forum

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

Help materials for Version 6

  • AideenW
  • AideenW's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 months 4 days ago #254662 by AideenW
Replied by AideenW on topic Help materials for Version 6
Hi Joffm,

Thanks again for the advice. I don't think that approach would be suitable though as what I need to do is randomize the presentation of task type (e.g., names, behaviors and graphs), as well as the questions within these tasks.

I'm gathering though that this level of randomization simply isn't possible within the limesurvey software (at least not without script editing, which I don't yet have permissions for). Is that correct?

I guess my main concern now would be how I ensure that participants only answer a selection of questions from each task (i.e., 11/33 names, 15/45 behaviors and 6/12 graphs). Would the solution be to apply randomization group names, or some sort of equation randomization (and how would this be done)??

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 4 days ago - 10 months 4 days ago #254704 by Joffm
Replied by Joffm on topic Help materials for Version 6
In my sample there is included
1. Randomization of the three tasks (B N G)
2. Selection of 11 names and random display of the names
3. Selection of one behaviour group.
There was no randomization of question included from your side, so I did not add it. But this is easy done by randomization group name on question level

I think this is all you required.

Did you import my sample?
Are you allowed to use javascript?

If so, extend the sample to the full amount of names, add the randomization group name to the behaviour questions.
If there are more questions, send the lss export.

Joffm

P.S.
Anyway, the other way is to double the behaviour and graph questions, before and after the names groups, then create two random numbers and display one of them accordingly.
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 10 months 4 days ago by Joffm.

Please Log in to join the conversation.

  • AideenW
  • AideenW's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 months 4 days ago #254705 by AideenW
Replied by AideenW on topic Help materials for Version 6
Hi Joffm,

Thanks for the tip! I can't open the survey you sent- it's just hundreds of lines of code, not a survey that I can make sense of (do I need a Javascript reader or something)...

I don't know if you saw my earlier comment but I don't think the approach you outlined above in your last comment would give me what I'm trying to achieve. The point is that all questions on all task types need to be randomized, along with the task types themselves being randomized. But (correct me if I'm wrong) I don't think that's possible, so what I want to do now is just randomize the presentation of the questions within each task type (which I think I've gotten the hang of).

Besides that, my main issue right now is not so much the randomization, but rather ensuring that participants will only be presented with the correct amount of questions per task. (i.e., the 11/33 names, etc). I've restarted the survey from scratch to become more familiar with the randomization tools on a smaller scale and I think I've figured out how to achieve what I'm looking for with respect to that.

Please Log in to join the conversation.

  • AideenW
  • AideenW's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 months 4 days ago #254707 by AideenW
Replied by AideenW on topic Help materials for Version 6
To answer your question: I still have no permissions for JavaScript. I think i could get them but I'm waiting for a response from the tech people.
I figured out how to import the survey (so its' not just lines of code), so I'm going to check that out now. Sorry, I thought I needed some kind of software or something to look at it!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 3 days ago #254728 by holch
Replied by holch on topic Help materials for Version 6

Sorry, I thought I needed some kind of software or something to look at it!


Yes, the software called Limesurvey. :-)

LSS is a file format based on XML that allows to interchange Limesurvey surveys from one installation to another. So for you, this is certainly important to save the LSS file of your final Limesurvey questionnaire structure, together with your other documents of your thesis or study.

There is also a LSA file, which is made for archiving Limesurvey studies, which also includes other things besides the survey structure, like responses, etc.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 3 days ago #254730 by Joffm
Replied by Joffm on topic Help materials for Version 6

but I don't think the approach you outlined above in your last comment would give me what I'm trying to achieve.

And how many times have I to write that it does.
This afternoon I started the survey several times and got the following outcomes
G - N - B2
B3 - G - N
B3 - G - N
B2 - N- -G
N - B3 - G
G - N - B3
N - G - B1
B2 - N - G
G - B1 - N
G - B2 - N
B1 - N - G
G - N - B3
B2 - N - G
G - N - B1
G - B1 - N
G - N - B2
You see B1, B2, B3 randomly, also B,N und G randomly.

Without javascript my sample is rather useless, but I also wrote before that there is a solution that only uses ExpressionScript.
Javascript is short and handy, the other is a bit lengthy.
If you can read German you will find an example in my "Tutorial 4. Gleichungen,..." in the Germen part.

But nevertheless I'll change my sample survey to the ExpressionScript sokution,.
It's a bit lengthy and a lot to write. Therefore javascript is the preferred solution.

And obviously you did not read th manual.
Here you would have found how to import a lss export.
[url] www.limesurvey.org/manual/Surveys_-_intr...tion#Import_a_survey [/url]
:
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • AideenW
  • AideenW's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 months 3 days ago #254738 by AideenW
Replied by AideenW on topic Help materials for Version 6
Thank you! I'm so not a computer person so I appreciate you explaining these details!

Please Log in to join the conversation.

  • AideenW
  • AideenW's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 months 3 days ago #254740 by AideenW
Replied by AideenW on topic Help materials for Version 6
Perhaps I wasn't clear in what I meant before. The randomization of parts is good, and indeed works, apart from the fact that the names do not appear (at least for me) in the 10 times I've tested the survey.
Moreover, the randomization aspect I have figured out (thanks for your help with that, and @holch), and successfully applied. The main issue I am having now is how to make only 11 out of 33 names appear. I'm assuming I can't take the same approach as you did with the behaviors, since the names themselves appear in different groups.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 3 days ago - 10 months 3 days ago #254750 by Joffm
Replied by Joffm on topic Help materials for Version 6
Hi,
are you now able to use javascript?
If not, of course the names are not showing.

Now here's my sample without using javascript
 

File Attachment:

File Name: limesurvey...5781.lss
File Size:433 KB


Because I only show 4 out of 10 names you have to 
extend the survey to your 33 names
change these two lines in "eqNames"
{selNames_11='123456789A'}  - 10 Elements
to
{selNames_11='123456789ABCDEFGHIJKLMNOPQRSTUVWX'}  - 33 Elements

and
{selNames_999=join('#',selNames_13,selNames_23,selNames_33,selNames_43)}  - 4 Elements
to
{selNames_999=join('#',selNames_13,selNames_23,selNames_33,selNames_43,selNames_53,selNames_63,selNames_73,selNames_83,selNames_93,selNames_103,selNames_113)}  - 11 elements

In my opinion this calculation is rather straightforward and easy to understand.
Question "selNames" is a question of type "multiple short text" and is used as a container.
To select one element we need three equations; therefore the subquestions are coded 11, 12, 13, 21, 22, 23, 31, 32, ...
Code:
{selNames_11='123456789ABCDEFGHIJKLMNOPQRSTUVWX'}
{selNames_12=if(is_empty(selNames_12),rand(1,strlen(selNames_11)),selNames_12)}
{selNames_13=substr(selNames_11,selNames_12-1,1)}
{selNames_21=str_replace(selNames_13,'',selNames_11)}
{selNames_22=if(is_empty(selNames_22),rand(1,strlen(selNames_21)),selNames_22)}
{selNames_23=substr(selNames_21,selNames_22-1,1)}
{selNames_31=str_replace(selNames_23,'',selNames_21)}
{selNames_32=if(is_empty(selNames_32),rand(1,strlen(selNames_31)),selNames_32)}
{selNames_33=substr(selNames_31,selNames_32-1,1)}
{selNames_41=str_replace(selNames_33,'',selNames_31)}
{selNames_42=if(is_empty(selNames_42),rand(1,strlen(selNames_41)),selNames_42)}
{selNames_43=substr(selNames_41,selNames_42-1,1)}
{selNames_51=str_replace(selNames_43,'',selNames_41)}
{selNames_52=if(is_empty(selNames_52),rand(1,strlen(selNames_51)),selNames_52)}
{selNames_53=substr(selNames_51,selNames_52-1,1)}
{selNames_61=str_replace(selNames_53,'',selNames_51)}
{selNames_62=if(is_empty(selNames_62),rand(1,strlen(selNames_61)),selNames_62)}
{selNames_63=substr(selNames_61,selNames_62-1,1)}
{selNames_71=str_replace(selNames_63,'',selNames_61)}
{selNames_72=if(is_empty(selNames_72),rand(1,strlen(selNames_71)),selNames_72)}
{selNames_73=substr(selNames_71,selNames_72-1,1)}
{selNames_81=str_replace(selNames_73,'',selNames_71)}
{selNames_82=if(is_empty(selNames_82),rand(1,strlen(selNames_81)),selNames_82)}
{selNames_83=substr(selNames_81,selNames_82-1,1)}
{selNames_91=str_replace(selNames_83,'',selNames_81)}
{selNames_92=if(is_empty(selNames_92),rand(1,strlen(selNames_91)),selNames_92)}
{selNames_93=substr(selNames_91,selNames_92-1,1)}
{selNames_101=str_replace(selNames_93,'',selNames_91)}
{selNames_102=if(is_empty(selNames_102),rand(1,strlen(selNames_101)),selNames_102)}
{selNames_103=substr(selNames_101,selNames_102-1,1)}
{selNames_111=str_replace(selNames_103,'',selNames_101)}
{selNames_112=if(is_empty(selNames_112),rand(1,strlen(selNames_111)),selNames_112)}
{selNames_113=substr(selNames_111,selNames_112-1,1)}
{selNames_999=join('#',selNames_13,selNames_23,selNames_33,selNames_43,selNames_53,selNames_63,selNames_73,selNames_83,selNames_93,selNames_103,selNames_113)}

11. we fill the first base with 33 elements
12. We create a random number from 1 to the length of the string in 11
13. We put the element with index of this random number into 13
21. We remove (str_replace) this element from 11 and put the rest into 21
22. We create a random number from 1 to the length of the string in 21
23. We put the element with index of this random number into 23
31. We remove (str_replace) this element from 21 and put the rest into 31
32. We create a random number from 1 to the length of the string in 31
and so on.

In the last equation we join all these elements to a final string
This is used to display the name questions. function "strpos(haystack,needle)"
The condition is "strpos(selNames_999,"1")>0"
Meaning: If the index of "1" in selNames is greater than 0, it is existing.
Because the result "0" means "not found", but the functions returns 0 for the first element, there is the '#' at first place. Now the first valid element starts at position 1.

If the string contains "1", the 1. name is displayed.
If the string contains "2", the 2. name is displayed.
If the string contains "P", the 25. name is displayed.
and so on.

If you want to display the items in each behaviour group as well, you have to add a randomization group name to each question.
In the last behaviour group I used an array - just for demonstration.

And at last:
All questions are "not mandatory" - easier to test. 

Set it as you want to.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 10 months 3 days ago by Joffm.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 3 days ago #254753 by Joffm
Replied by Joffm on topic Help materials for Version 6
Addition:
Also for easier testing I set the survey to "group by group".
You have to set back to "question by question".

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: AideenW

Please Log in to join the conversation.

  • AideenW
  • AideenW's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 months 3 days ago #254757 by AideenW
Replied by AideenW on topic Help materials for Version 6
Great, I think I can understand what you did there from the explanation you provided, thank you!
One question though- can I apply this to the rest of the names if I don't have coding permissions? Like can I take a selection of the code above and paste into the Expression Script for each question?

Please Log in to join the conversation.

  • AideenW
  • AideenW's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 months 3 days ago #254765 by AideenW
Replied by AideenW on topic Help materials for Version 6
I'm a little confused- do I have to make any other edits to what you have presented in the example you sent back today, other than input the names as groups and adjust the two lines of code?
I've done so with the code, and added extra names but for some reason I still only see four names at any given time. The new ones I have input are appearing though, so that randomization is working well, but the expansion is not.
Is there something I need to be doing with [selNames]?

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose