Implicit Association Test (IAT) in version 3.15.9

More
1 year 3 months ago #182265 by RitaShen
hi there,

I have problem with IAT question.
my LimeSurvey version is 3.15.9
I follow this step (Version 2.50) and use the Demo Survey.

but it cannot appear smoothly, it won't shows [Black] [White] on the top right side and the left side.
and it won't shows [Press E to classify as Black or I to classify as White] at the end .




can anyone help me?

thanks
Rita
Attachments:

Please Log in to join the conversation.

More
1 year 3 months ago - 1 year 3 months ago #182272 by Joffm
Hi, Rita,
exchange this line in the javascript
var thisQuestionHelp = $('div.question-help', thisQuestion);
to
var thisQuestionHelp = $('div.ls-questionhelp', thisQuestion);

You get:

Version: 3.16.0
Template: vanilla with added styles of the workaround

Best regards
Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 1 year 3 months ago by Joffm.
The following user(s) said Thank You: RitaShen, cdorin

Please Log in to join the conversation.

More
1 year 3 months ago #182317 by RitaShen

Please Log in to join the conversation.

More
2 months 3 days ago #198203 by Antonia-nie
H Hi,

I would like to include an IAT in my survey, but have proplems with the workaround template. Is there a way to make it work on a Limesurvey version 4.2.?


thank you

Antonia

Please Log in to join the conversation.

More
2 months 2 days ago #198236 by Antonia-nie
My bad. It's working now :)

Please Log in to join the conversation.

More
2 months 2 days ago - 2 months 2 days ago #198237 by tpartner
Maybe this is a good candidate for a custom question theme.

[Edit] Oh, wait, custom array question themes are still broken in 4.x - bugs.limesurvey.org/view.php?id=15919

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 2 months 2 days ago by tpartner.

Please Log in to join the conversation.

More
2 months 2 days ago #198273 by tpartner
Here is a custom question theme for an Implicit Association Test (IAT) in version 3.x - github.com/tpartner/LimeSurvey-Implicit-Association-Test

It should also work in version 4.x when the bug mentioned above is fixed.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
1 month 2 weeks ago #199342 by Antonia-nie
Hi, I have one more question.
I'm trying to design an IAT with two different categories.
For clarity I would like to display the lower categories in green. That alone works, but i don't know how i can display the corresponding words in the middle in green too. Is it even possible?

My code form the IAT workaround
// Insert IAT display
		var iatTexts = $(thisQuestionHelp).text().split('||');
		var iatDisplayHTML = '<div class="iatWrapper2">\
								<div class="iatLeftLabel">'+iatTexts[0]+'</div>\
								<div class="iatRightLabel">'+iatTexts[1]+'</div>\
								<div class="iatWord2"></div>\
								<div class="iatInstructions">'+iatTexts[2]+'</div>\
								<div class="iatPlusrfarbig">'+iatTexts[3]+'</div>\
								<div class="iatPlusl">'+iatTexts[4]+'</div>\
								<div class="iatPlus1r">'+iatTexts[5]+'</div>\
								<div class="iatPlus1lfarbig">'+iatTexts[6]+'</div>\
							</div>\
							<div class="iatMobileButtonWrapper">\
								<div class="iatButton iatLeftButton">E</div>\
								<div class="iatButton iatRightButton">I</div>\
								<div style="width:100%; clear:both;"></div>\
							</div>';
		$(thisQuestionAnswers).prepend(iatDisplayHTML);
 
		// Show a word
		function iatShowWord() {
			$('div.iatWord2', thisQuestion).text($('tr.subquestion-list.unanswered:first .answertext', thisQuestion).text());
			startTime = new Date();
 
			$(document).bind('keypress.iatKeypress', function(e) {
				if(e.which == 101 || e.which == 105) {
					var thisRow = $('tr.subquestion-list.unanswered:eq(0)', thisQuestion);
					$(thisRow).removeClass('unanswered');
					endTime = new Date();
					$('input[type="text"]:eq(1)', thisRow).val(endTime.valueOf() - startTime.valueOf());
					if(e.which == 101) {
						$('input[type="text"]:eq(0)', thisRow).val('E');
					}
					else {
						$('input[type="text"]:eq(0)', thisRow).val('I');
					}
					$(document).unbind('keypress.iatKeypress');
					if($('tr.subquestion-list.unanswered', thisQuestion).length > 0) {
						iatShowWord();
					}
					else {
						$('.iatLeftLabel, .iatWord2, .iatRightLabel, .iatInstructions, .iatPlusrfarbig, .iatPlusl, .iatPlus1r, .iatPlus1lfarbig', thisQuestion).fadeOut('slow', function() {
							$('div.iatWord2', thisQuestion).text(iatTexts[7]);
							$('.iatWord2', thisQuestion).addClass('done').fadeIn('slow');
						});
					}
				}
			});
		}

Thank you very much.
Attachments:

Please Log in to join the conversation.

More
1 month 2 weeks ago #199352 by Joffm
Hi,
you have to set
.iat-word {color:green}

I used tpartner's question theme
and changed in iat.css directly to red.

See:


Joffm


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

Please Log in to join the conversation.

More
1 month 2 weeks ago #199367 by Antonia-nie
Yes thank you, that works. But only for all words together, is it possible to define single words from the subquestions to turn green?

Please Log in to join the conversation.

More
1 month 2 weeks ago #199372 by tpartner
If using the workaround, try this (untested as I am responding via phone):

Change this line:
$('div.iatWord2', thisQuestion).text($('tr.subquestion-list.unanswered:first .answertext', thisQuestion).text());


To this:
$('div.iatWord2', thisQuestion).text($('tr.subquestion-list.unanswered:first .answertext', thisQuestion).html());

Then you should be able to use something like this in the sub-question text:
<span style="color:red">Banana</span>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in to join the conversation.

More
1 month 2 weeks ago #199420 by Antonia-nie
Thanks a lot for your help!
When I do that, that happens:
Attachments:

Please Log in to join the conversation.

More
1 month 1 week ago - 1 month 1 week ago #199435 by Joffm
Hi,
a little bit of trial&error gave me this:

Change to:
$('div.iatWord2', thisQuestion).html($('tr.subquestion-list.unanswered:first .answertext', thisQuestion).html());





Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 1 month 1 week ago by Joffm.
The following user(s) said Thank You: tpartner, Antonia-nie

Please Log in to join the conversation.

More
1 month 1 week ago #199437 by Antonia-nie
thanks a million, works perfectly.

Please Log in to join the conversation.

More
1 month 1 week ago #199438 by tpartner
Thanks Joffm.

By the way the reason that I used .text() in the workaround (and question theme) was to avoid problems with HTML changes in future versions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now