correct responses for checkboxes


Author
Message
laurenemberson
laurenemberson
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)
Group: Forum Members
Posts: 12, Visits: 24
Hi!  I'm having trouble with checkboxes.  My checkbox question shows up fine with the correct options but every answer that I select is labeled as incorrect and I'm not able to continue past this point. I want the subject to not be able to continue until they are correct.  Here is my code.  Many thanks!!!  ~Lauren

<checkboxes task>
/ caption = "What is your task?"
/ range = (1,1)
/ required = true
/ options = ("To respond for each picture of a dog", "To respond whether a picture is rotated or not","To respond when a picture is black and white or color")
/ optionvalues = ("1", "2", "3")
/ validresponse=("1", "2", "3")
/ correctresponse = ("2")
</checkboxes>

<surveypage taskQ1>
/ caption = "Please answer the following questions about your ask. You cannot start the experiment until you get these correct."
/ fontstyle = ("Verdana", -18, true, false, false, false, 5, 0)
/ showquestionnumbers = true
/ questions = [1=task]
</surveypage>

<survey taskQuestionnaire>
/ pages = [1=taskQ1]
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 4%
/ showpagenumbers = false
</survey>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
laurenemberson - Friday, December 30, 2016
Hi!  I'm having trouble with checkboxes.  My checkbox question shows up fine with the correct options but every answer that I select is labeled as incorrect and I'm not able to continue past this point. I want the subject to not be able to continue until they are correct.  Here is my code.  Many thanks!!!  ~Lauren

<checkboxes task>
/ caption = "What is your task?"
/ range = (1,1)
/ required = true
/ options = ("To respond for each picture of a dog", "To respond whether a picture is rotated or not","To respond when a picture is black and white or color")
/ optionvalues = ("1", "2", "3")
/ validresponse=("1", "2", "3")
/ correctresponse = ("2")
</checkboxes>

<surveypage taskQ1>
/ caption = "Please answer the following questions about your ask. You cannot start the experiment until you get these correct."
/ fontstyle = ("Verdana", -18, true, false, false, false, 5, 0)
/ showquestionnumbers = true
/ questions = [1=task]
</surveypage>

<survey taskQuestionnaire>
/ pages = [1=taskQ1]
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 4%
/ showpagenumbers = false
</survey>



#1: I don't think <checkboxes> are the appropriate question-type here. They allow for selecting multiple options, while -- if I understand your intent correctly -- you only want the participant to select a single one. <radiobuttons> would be a better fit then.

#2: "I want the subject to not be able to continue until they are correct." <- This needs to be fleshed out more. Suppose the subject gives a wrong response, then what is supposed to happen? Do you want to display the same page / question again? Or do you want something else to happen (what)?

<radiobuttons task>
/ caption = "What is your task?"
/ required = true
/ options = ("To respond for each picture of a dog", "To respond whether a picture is rotated or not","To respond when a picture is black and white or color")
/ optionvalues = ("1", "2", "3")
/ validresponse=("1", "2", "3")
/ correctresponse = ("2")
</radiobuttons>

<surveypage taskQ1>
/ caption = "Please answer the following questions about your ask. You cannot start the experiment until you get these correct."
/ fontstyle = ("Verdana", -18, true, false, false, false, 5, 0)
/ showquestionnumbers = true
/ questions = [1=task]
/ branch = [
    if(radiobuttons.task.response != "2") surveypage.taskQ1
]
</surveypage>

<survey taskQuestionnaire>
/ pages = [1=taskQ1]
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 4%
/ showpagenumbers = false
/ showbackbutton = false
</survey>

laurenemberson
laurenemberson
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)
Group: Forum Members
Posts: 12, Visits: 24
#2: "I want the subject to not be able to continue until they are correct." <- This needs to be fleshed out more. Suppose the subject gives a wrong response, then what is supposed to happen? Do you want to display the same page / question again? Or do you want something else to happen (what)?

> if they give a wrong response, I want the same question/page to be displayed again again and for that to be repeated until they get the correct response. 

Further question, from the radiobutton code that you have, there is a correct answer coded but I'm not sure what that is doing.  When I get the survey data, it contains the response but there is no coding about whether it was the correct or incorrect response. 

Much appreciated!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
laurenemberson - Friday, December 30, 2016
#2: "I want the subject to not be able to continue until they are correct." <- This needs to be fleshed out more. Suppose the subject gives a wrong response, then what is supposed to happen? Do you want to display the same page / question again? Or do you want something else to happen (what)?

> if they give a wrong response, I want the same question/page to be displayed again again and for that to be repeated until they get the correct response. 

Further question, from the radiobutton code that you have, there is a correct answer coded but I'm not sure what that is doing.  When I get the survey data, it contains the response but there is no coding about whether it was the correct or incorrect response. 

Much appreciated!

> if they give a wrong response, I want the same question/page to be displayed again again and for that to be repeated until they get the correct response.

Okay, thanks for the clarification. This is what the code in my previous reply already does, so I don't think any further elaboration is necessary.

> Further question, from the radiobutton code that you have, there is a correct answer coded but I'm not sure what that is doing.  When I get the survey data, it contains the
> response but there is no coding about whether it was the correct or incorrect response.

The data format for <survey> elements is different than the date format for regular <block>s. In survey-data, there is no "correct" column. You can see what the /correctresponse code does when running the page via a <block> instead:

<radiobuttons task>
/ caption = "What is your task?"
/ required = true
/ options = ("To respond for each picture of a dog", "To respond whether a picture is rotated or not","To respond when a picture is black and white or color")
/ optionvalues = ("1", "2", "3")
/ validresponse=("1", "2", "3")
/ correctresponse = ("2")
</radiobuttons>

<surveypage taskQ1>
/ caption = "Please answer the following questions about your ask. You cannot start the experiment until you get these correct."
/ fontstyle = ("Verdana", -18, true, false, false, false, 5, 0)
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 4%
/ showpagenumbers = false
/ showquestionnumbers = true
/ questions = [1=task]
/ branch = [
    if(radiobuttons.task.response != "2") surveypage.taskQ1
]
</surveypage>

<block taskQuestionnaire>
/ trials = [1=taskQ1]
</block>

laurenemberson
laurenemberson
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)
Group: Forum Members
Posts: 12, Visits: 24
Dave - Friday, December 30, 2016
laurenemberson - Friday, December 30, 2016
#2: "I want the subject to not be able to continue until they are correct." <- This needs to be fleshed out more. Suppose the subject gives a wrong response, then what is supposed to happen? Do you want to display the same page / question again? Or do you want something else to happen (what)?

> if they give a wrong response, I want the same question/page to be displayed again again and for that to be repeated until they get the correct response. 

Further question, from the radiobutton code that you have, there is a correct answer coded but I'm not sure what that is doing.  When I get the survey data, it contains the response but there is no coding about whether it was the correct or incorrect response. 

Much appreciated!

> if they give a wrong response, I want the same question/page to be displayed again again and for that to be repeated until they get the correct response.

Okay, thanks for the clarification. This is what the code in my previous reply already does, so I don't think any further elaboration is necessary.

> Further question, from the radiobutton code that you have, there is a correct answer coded but I'm not sure what that is doing.  When I get the survey data, it contains the
> response but there is no coding about whether it was the correct or incorrect response.

The data format for <survey> elements is different than the date format for regular <block>s. In survey-data, there is no "correct" column. You can see what the /correctresponse code does when running the page via a <block> instead:

<radiobuttons task>
/ caption = "What is your task?"
/ required = true
/ options = ("To respond for each picture of a dog", "To respond whether a picture is rotated or not","To respond when a picture is black and white or color")
/ optionvalues = ("1", "2", "3")
/ validresponse=("1", "2", "3")
/ correctresponse = ("2")
</radiobuttons>

<surveypage taskQ1>
/ caption = "Please answer the following questions about your ask. You cannot start the experiment until you get these correct."
/ fontstyle = ("Verdana", -18, true, false, false, false, 5, 0)
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 4%
/ showpagenumbers = false
/ showquestionnumbers = true
/ questions = [1=task]
/ branch = [
    if(radiobuttons.task.response != "2") surveypage.taskQ1
]
</surveypage>

<block taskQuestionnaire>
/ trials = [1=taskQ1]
</block>

Thanks so much Dave! I have everything working now.  I appreciate your help very much!  
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search