Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Is there a possibility to assign pictures/extra information to choice tasks in CBC?


I have an additional question:

Is it possible to assign some kind of picture to a specific choice task?
For example: I have 40 different choice tasks in total (4 questionnaires each with 10 choice tasks). I would like to assign specific pictures with information to each of the 40 choice tasks.

The assigned "picture" would contain additional information for all the tasks in this specific choice task (the picture should be above the tasks). Something like: Choice task 1 of 40 has the following information included in the header: "imagine a sunny day", choice task 2 of 40 has: "imagine a rainy day". choice task 28 of 40 has: "imagine a windy day".

Would this be possible?

Thanks in advance
asked Mar 19, 2018 by epoxo (140 points)

1 Answer

0 votes
Add this code to your exercise:

[% Begin Unverified Perl
my @headers = (
    'first question',
    'second question',
    'third question'

my $qname = QUESTIONNAME();
my ($qnum) = $qname =~ m/_Random([0-9]+)$/;
return $headers[$qnum - 1];
End Unverified %]

You can update line 3-5 to change the texts that appear in the first three tasks.  Of course, this can be updated with the number of tasks in your exercise.

This code assumes your exercise has only random tasks.  If you are using random tasks, it will need to be adjusted.
answered Mar 19, 2018 by Zachary Platinum Sawtooth Software, Inc. (111,725 points)
Thank you for your advice.
But I'm not sure how to implement this for more than 1 fixed questionnaire. If I would follow your approach, I could for example add 7 more lines to assign text to a total of 10 fixed choice tasks. My problem is that I have a total of 4 fixed questionnaires (with 10 choice tasks each). This solution would only work if the "text-information" is in every questionnaire the same. But unfortunately I would need 40 different texts/images, because every one of the 40 choice tasks are different.

So basically I have 40 different fixed choice tasks, spread over 4 questionnaires in total, each of them needs specific information.

I really don't know if this is possible. I'm thankful for your help.
If you need different texts in each questionnaire, can you modify the code and put the slightly modified code into each questionnaire?  Give the first questionnaire the first ten texts, the second questionnaire the next ten texts, and so on?