what's wrong with this AJT item?

17 views
Skip to first unread message

Jeremy

unread,
May 7, 2021, 6:51:47 AMMay 7
to ibexexperiments
Dear all,

I tried to add an AJT item to the experiment. But it shows "ERROR: Every element in the 'items' Array must be an Array".

[["DIA.A", 1], "AcceptabilityJudgment", {s: {html: "<b>Which struggling students</b> did the teacher encourage to succeed without treating their friends like idiots?"}}]


Best wishes,
Jeremy

  

Alexandre Cremers

unread,
May 7, 2021, 9:36:55 AMMay 7
to ibexexp...@googlegroups.com
The 's' argument must be a string. If you want to include html tags, I think you need to edit the code for the controller (unless it's already possible), and after that just use:
{s: "<b>Which struggling students</b> did the teacher encourage to succeed without treating their friends like idiots?"}
Best,
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 ibexexperimen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ibexexperiments/3ad89d5b-21b6-4127-b764-e90d5c585f7dn%40googlegroups.com.

Jeremy

unread,
May 7, 2021, 4:23:42 PMMay 7
to ibexexperiments
Thank you Alexandre. Do you have any idea of how to edit the code for the controller?

Best wishes,
Jeremy

Nick Huang

unread,
May 7, 2021, 8:18:25 PMMay 7
to ibexexp...@googlegroups.com
There's also a workaround using the q parameter, as Jeremy Zehr has pointed out: (https://groups.google.com/g/ibexexperiments/c/fHoOvBYBLQU/m/ELcrugkIDgAJ)

If you'd rather stick to using the s parameter and don't want to mess with editing the controllers, here is a not-very-clean workaround, injecting some javascript in the q paramater which will fill the s parameter on runtime (mind the \\ before the apostrophe in the sentence):
[["practice", 100], "AcceptabilityJudgment", {s: "", q: "<script>$('.FlashSentence-FlashSentence').html('A: Hi Joan, how are you?<br>B: Hey John, I\\'m great!');</script>"}],

Best regards,
Nick

Jeremy

unread,
May 8, 2021, 8:14:03 AMMay 8
to ibexexperiments
Thank you so much Nick! It works!

Best wishes,
Jeremy

Reply all
Reply to author
Forward
0 new messages