- Posts: 5033
- Thank you received: 1257
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Partially Randomized Answers Array
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
9 years 4 months ago - 9 years 4 months ago #115583
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Partially Randomized Answers Array was created by jelo
If you want to randomize not all items of an array, but keep certain item on there position.
Is there a workaround possible? Often there are groups of items which should be randomized as block as well. The workaround list in the manual seems to more into one column answers.
BTW: The manual states Array and Other option.
manual.limesurvey.org/Question_type_-_Ar...Other.27_.28other.29
Is that the case? I haven't seen this option (in the uptodate versions)?
Thanks in advance.
Is there a workaround possible? Often there are groups of items which should be randomized as block as well. The workaround list in the manual seems to more into one column answers.
BTW: The manual states Array and Other option.
manual.limesurvey.org/Question_type_-_Ar...Other.27_.28other.29
Is that the case? I haven't seen this option (in the uptodate versions)?
Thanks in advance.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 9 years 4 months ago by jelo. Reason: Add Lines
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
9 years 4 months ago #115587
by tpartner
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Partially Randomized Answers Array
Adding a script like this to the question source will "fix" the item with sub-question code "A1" in the last position.If you want to randomize not all items of an array, but keep certain item on there position.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // The sub-question code to place in the last position var fixedCode = 'A1'; // Identify this question var q1ID = {QID}; var thisQuestion = $('#question'+q1ID); // Move the "fixed" row to the end $('table.subquestions-list tbody', thisQuestion).append($('tr[id$="X'+q1ID+fixedCode+'"]')); }); </script>
No, that is an error....Is that the case? I haven't seen this option (in the uptodate versions)?
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
9 years 4 months ago #115659
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Partially Randomized Answers Array
Thanks Tony for your feedback.
I remember a few sideeffects when using this kind of workarounds with certain templates.
Isn't there a problem with the colors, when rows are in different colors?
The e.g. default template, right?
I remember a few sideeffects when using this kind of workarounds with certain templates.
Isn't there a problem with the colors, when rows are in different colors?
The e.g. default template, right?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
9 years 4 months ago #115661
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Partially Randomized Answers Array
Try this:
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // The sub-question code to place in the last position var fixedCode = 'A1'; // Identify this question var q1ID = {QID}; var thisQuestion = $('#question'+q1ID); // Move the "fixed" row to the end $('table.subquestions-list tbody', thisQuestion).append($('tr[id$="X'+q1ID+fixedCode+'"]')); // Fix up the array row background colours $('tr.answers-list', thisQuestion).each(function(i){ $(this).removeClass('array1 array2').addClass('array'+(2-(i%2))); }); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
9 years 4 months ago #115665
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Partially Randomized Answers Array
Thanks Tony,
do you have a big library of workaround? Or are doing it all out of your head.
And that early in the morning in your timezone, right?
Perhaps a Tony Advisor should be added to the HTML Editor inside Limesurvey.
If I get it right, this workaround for arrays is not in the manual/wiki.
Thanks.
do you have a big library of workaround? Or are doing it all out of your head.
And that early in the morning in your timezone, right?
Perhaps a Tony Advisor should be added to the HTML Editor inside Limesurvey.
If I get it right, this workaround for arrays is not in the manual/wiki.
Thanks.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
9 years 4 months ago #115667
by tpartner
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Partially Randomized Answers Array
I do a little searching in my files for previous workarounds but most are from scratch.do you have a big library of workaround? Or are doing it all out of your head.
Now it is - manual.limesurvey.org/Workarounds:_Manip...rs_-_Array_questionsIf I get it right, this workaround for arrays is not in the manual/wiki.
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
9 years 4 months ago #115701
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Partially Randomized Answers Array
Thanks, Tony!
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.