Race IAT issue

66 views
Skip to first unread message

Olivia Morzenti

unread,
Mar 28, 2021, 6:36:15 PM3/28/21
to Minno.js

Hello,

I am trying to set up a Race IAT survey using my school's Qualtrics software. I am not having any luck with the JavaScript. Can someone give me a simple step by step on how to get the entire Race IAT to appear. I was able to follow the directions and get the sample to appear, but that is all.

Thanks

Olivia

Mayan Navon

unread,
Mar 29, 2021, 5:48:07 AM3/29/21
to Olivia Morzenti, Minno.js
Hi Olivia,

Have you read this guide?  
Please provide more details: explain in detail what steps you already made, and provide the code you used for each step.

Thanks,
Mayan

--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minnojs/37d9339f-8144-4a18-b2d7-2d2119c2bf61n%40googlegroups.com.


--
Mayan

Mayan Navon

unread,
Mar 29, 2021, 7:35:02 AM3/29/21
to Olivia Morzenti, Minno.js
Please attach your code so we can inspect it: provide the code you inserted to the question's JavaScript, and the code for the task that replaces our example. Also, please indicate where you saved your code for the task (i.e., on which server).

On Mon, Mar 29, 2021 at 2:21 PM Olivia Morzenti <oliviam...@isu.edu> wrote:
Yes, that was the guide I followed. The JavaScript for the ‘example’ worked great to test it out. However, when I tried to replace it with the Race IAT extension nothing showed up on the survey. 
--
Olivia Morzenti, BS, RDH, CDHC
MS Dental Hygiene Student, Idaho State University

“The power of the people is STRONGER than the people in power
-Wael Ghonim


--
Mayan

Mayan Navon

unread,
Mar 30, 2021, 8:17:43 AM3/30/21
to Olivia Morzenti, Minno.js, Yoav Bar- Anan
I'm not sure which part of the code is not working for you, so I'll repeat the steps:

To use the Race IAT on Qualtrics, you need to 
1. Add this code to a multi-line text-entry question (specifically, press the gear icon and select Add JavaScript) :
Qualtrics.SurveyEngine.addOnload(function () {
    // hide question and next button
    var container = this.getQuestionContainer();
    container.querySelector('.Inner').style.display = 'none';
    this.hideNextButton();

    // load MinnoJS from the CDN (you probably don't need to change this)
    var scriptTag = document.createElement('script');
    scriptTag.src = 'https://cdn.jsdelivr.net/gh/minnojs/minno-quest@0.3/dist/pi-minno.js';
    scriptTag.onload = onLoad;
    scriptTag.onreadystatechange = onLoad;
    container.appendChild(scriptTag);

    // create the root element for Minno
    var canvas = document.createElement('div');
    container.appendChild(canvas);

    // function to proceed to next question
    var proceed = this.clickNextButton.bind(this);

    // This function gets activated only after MinnoJS is loaded
    function onLoad() {
        // Run your study (just set the correct URL)
        minnoJS(canvas, 'https://cdn.jsdelivr.net/gh/baranan/minno-tasks@0.*/IAT/qualtrics/exampleQIAT.js');

        // MinnoJS doesn't know about Qualtrics, we pass a function to inject the results into the question
        // For some reason `piGlobal` isn't available so we attach it to `minnoJS`
        minnoJS.logger = function (value) {
            var el = container.querySelector('textarea');
            el.value = value;
        }

        // At the end of the study let MinnoJS proceed to the next question
        // We need to wait a few miliseconds for Qualtrics to register the value that we entered
        minnoJS.onEnd = function () { setTimeout(proceed, 100); }
    }
});
2. Add a page break before and after the IAT question.
3. Run the study to see that it works.
4. Create a simple server, or use your personal website as a server, as explained in the guide.
5. Copy our example (pasted below) to a text editor on your computer (such as notepad) and edit it to suit your IAT (for a race IAT, use the labels "White people" and "Black people", and use images of White and Black faces). Note that you need to specify the name of YOUR stimuli and the URL to the location of those stimuli on YOUR server. The task won't work if you don't have the stimuli on your server. 
Here is a link to the stimuli often used on Project Implicit's IATs. You can download the race stimuli and use them.
Here is an example of an AMP task that I created, that uses my own stimuli, saved on my server (see the URL under base_url).
6. Change this URL in the code above, to the URL of YOUR server:
// Run your study (just set the correct URL) 
Here is my example of a modified URL.
7. Run the study to see that it works.

If I understand correctly, following step 3, you replaced the URL (step 6) with some other URL on our server. Is that right?




On Tue, Mar 30, 2021 at 12:43 AM Olivia Morzenti <oliviam...@isu.edu> wrote:
I used the IAT extensions online. none of them work, do I need to add them to something in order for them to work.


--
Mayan

Mayan Navon

unread,
Mar 30, 2021, 8:21:31 AM3/30/21
to Olivia Morzenti, Minno.js, Yoav Bar- Anan
5. Copy our example (pasted below) to a text editor on your computer (such as notepad) and edit it to suit your IAT (for a race IAT, use the labels "White people" and "Black people", and use images of White and Black faces). Note that you need to specify the name of YOUR stimuli and the URL to the location of those stimuli on YOUR server. The task won't work if you don't have the stimuli on your server. 
define(['pipAPI', 'https://cdn.jsdelivr.net/gh/baranan/minno-tasks@0.*/IAT/qualtrics/quiat9.js'], function(APIConstructor, iatExtension){
    var API = new APIConstructor();

	return iatExtension({
		category1 : {
			name : 'Black people', //Will appear in the data.
			title : {
				media : {word : 'Black people'}, //Name of the category presented in the task.
				css : {color:'#31940F','font-size':'2em'}, //Style of the category title.
				height : 4 //Used to position the "Or" in the combined block.
			}, 
			stimulusMedia : [ //Stimuli content as PIP's media objects
    		    {image : 'black1.jpg'}, 
    			{image : 'black2.jpg'}, 
    			{image : 'black3.jpg'}, 
    			{image : 'black4.jpg'}, 
    			{image : 'black5.jpg'}, 
    			{image : 'black6.jpg'}
			], 
			//Stimulus css (style)
			stimulusCss : {color:'#31940F','font-size':'1.8em'}
		},	
		category2 :	{
			name : 'White people', //Will appear in the data.
			title : {
				media : {word : 'White people'}, //Name of the category presented in the task.
				css : {color:'#31940F','font-size':'2em'}, //Style of the category title.
				height : 4 //Used to position the "Or" in the combined block.
			}, 
			stimulusMedia : [ //Stimuli content as PIP's media objects
    		    {image : 'yf1.jpg'}, 
    			{image : 'yf4.jpg'}, 
    			{image : 'yf5.jpg'}, 
    			{image : 'ym2.jpg'}, 
    			{image : 'ym3.jpg'}, 
    			{image : 'ym5.jpg'}			], 
			//Stimulus css
			stimulusCss : {color:'#31940F','font-size':'1.8em'}
		},	

		base_url : {//Where are your images at?
			image : 'https://baranan.github.io/minno-tasks/images/'
		} 
	});
});



--
Mayan
Reply all
Reply to author
Forward
0 new messages