TRUE/FALSE questions using 'as' component with hasCorrect=true / randomOrder=false.

184 views
Skip to first unread message

Mike D

unread,
Nov 29, 2012, 5:28:01 PM11/29/12
to ibexexp...@googlegroups.com
I want to define a simple True / False question, but...
Problem is that the 'as' option requires the correct answer be the *first* one listed.
The assumption must be that setting (randomOrder = true) will cause the correct answer to be shifted around for different test instances.
This makes sense for other question types, but not for T/F questions, where maintaining a fixed order is important.

So...
  How do I properly declare the 'as' options for a T/F question, needing to keep a fixed answer order while still allowing me to define the right answer?

-Mike
PS: I'm totally new to Ibex but am already loving it!  Please forgive my newbieness; I hope to be a pro before long.



Alex Drummond

unread,
Nov 29, 2012, 6:22:26 PM11/29/12
to ibexexp...@googlegroups.com
Hi Mike,

You should be able to use the 'hasCorrect' option to do this. From the docs:

'hasCorrect': If false, indicates that none of the answers is
privileged as correct. Otherwise, is either true, indicating that the
first answer in the 'as' list is the correct one; an integer, giving
the index of the correct answer in the as list (starting from 0); or a
string, giving the correct answer.

I.e., you should be able to set 'hasCorrect' to "TRUE" or "FALSE" (or 0 or 1).

Alex

Mike D

unread,
Nov 29, 2012, 10:08:33 PM11/29/12
to ibexexp...@googlegroups.com
Wow!  Hi Alex... I really need to lay off the coffee!  I'm stunned how I missed that after perusing the docs I don't know how many times.  Anyway, thanks!!

Gonzalo Silvera

unread,
Apr 25, 2017, 10:14:29 AM4/25/17
to ibexexperiments
Hello!
I found this forum but I don't know if it's still working. I have the same problem Mike D had and I can't work it out. I am using the question controller with 5 answers that must be fixed in order. One of the answers is correct. It would be great If someone can give me an example of how it works.

Gonzalo

Alexandre Cremers

unread,
Apr 25, 2017, 11:06:03 AM4/25/17
to ibexexp...@googlegroups.com
Dear Gonzalo,

If you specify your answers as "as: ['a','b','c','d','e'] ", then you can specify "hasCorrect=false" if no answer is correct, and "hasCorrect: 'b' " if 'b' is the correct answer. Note that you cannot specify multiple correct responses however.

Hope this helps,
Alexandre

--
You received this message because you are subscribed to the Google Groups "ibexexperiments" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibexexperiments+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gonzalo Silvera

unread,
Apr 26, 2017, 12:09:24 PM4/26/17
to ibexexperiments
It works!, thanks you very much Alexandre!
To unsubscribe from this group and stop receiving emails from it, send an email to ibexexperimen...@googlegroups.com.
Message has been deleted

Alexandre Cremers

unread,
May 8, 2021, 9:24:56 AM5/8/21
to ibexexp...@googlegroups.com
You have an extra comma at the end of your "as" array which may cause problems. What didn't work exactly?

On Sat, 8 May 2021, 16:16 Jeremy <yfc...@gmail.com> wrote:
Dear Alexandre,

Would you please let me know where I should add the 'hasCorrect: 'b'' to? My codes did not work:


[["TEST-locallong.A.1", 11 ], "DashedSentence", {s: "I received a new book"},
"Question", {hasCorrect: "Incorrect", randomOrder: true,
 q: "The book is not new.", as: ["Correct", "Incorrect", "I don't know", ]}],


Many thanks,
Jeremy

To unsubscribe from this group and stop receiving emails from it, send an email to ibexexperimen...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "ibexexperiments" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibexexperimen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ibexexperiments/fb354355-d8f5-4473-95fc-3f1f65fc88ban%40googlegroups.com.

Jeremy

unread,
May 8, 2021, 5:43:25 PM5/8/21
to ibexexperiments
Cheers Alexandre. I have sorted it out.

Best,
Jeremy
Reply all
Reply to author
Forward
0 new messages