0 votes
in Methoden-Fragen by s077736 (125 points)

I have 100 pictures and I need my participants to rate each image on 3 scales. I have created 3 questions. I can assign the question to multiple pages, but then the answer from the participant is overwritten. How can I ask the same question 100 times, without making 100 copies of the question? Is there a PHP solution for this? For example, creating copries of the question and then assigning them to each page? Or, is there a way to store an array of answers to one question?

Thanks!
-Caitlin

1 Answer

0 votes
by SoSci Survey (304k points)
selected by s077736
 
Best answer

I can give you an answer for 99 pictures - and you will need 3 more questions for the 100th one. However, please be adviced that 100x3 = 300 items is far too much for anyone to do. You will need 40-60 minutes to do that properly. And people will become less accurate throughout the lengthy and monotonous questionnaire.

First, create the 3 scales in 3 separate questions, using the question type "scale". And then have 99 Items in each question (99 times the same label). You can simply copy the label in a text or even easier in Excel and then paste the whole list into the direct item import - that's much faster than manually copying it 100 times.

The use loopPage() to display the same page 99 times, and show a different picture each time. If you like, you can even add rotation to the pictures, but don't forget to rotate the items in the same order.

$i = loopPage(99);
question('AB01', $i + 1, 'spacing=4');
question('AB02', $i + 1, 'spacing=4', 'show-title=no');
question('AB03', $i + 1, 'show-title=no');

What you actually do here: You show one item from each of the 3 questions - another one on each page. For the code to also display the pictures, please take a look into the manual, especially on randomization. It depends a bit on the filenames that your pictures use.

by s077736 (125 points)
Thanks! I used this code and it works. I needed to add more to the code to make sure that the image on each question item was saved. To do so I created an internal variable (1 question with as many items as images I wanted to display) and transfered the image name on each item to the internal variable item. Here is my code, in case it helps anyone! (I did reduce the number of images to 56).

if(!isset($my_images)) {
 $my_images = array('list of images here');
 shuffle($my_images);
 registerVariable('my_images');
}

$i=loopPage(55);
html('<center><img src = " '.$my_images[$i].'"></center>');
question('TX03', $i+1, 'spacing=4');
question('TX01', $i+1, 'spacing=4', 'show-title=no');
question('TX05', $i+1, 'show-title=no');
// Save the image for each question item to the internal variable 'TX16'
$varID = 'TX16_'.sprintf('%02d', $i+1);
put($varID, $my_images[$i]);
by SoSci Survey (304k points)
Please not that this configuration may give you a hard time when analyzing the data. It's way easier to shuffle a list of the indices (0..54) and then display the images and items of each index. That way you'll have the answers on a specific image in the same variable in each interview.

$my_images = array('list of images here');
if(!isset($order)) {
  $order = array_keys($my_images);
  shuffle($order);
  registerVariable($order);
}
$j=loopPage(count($order));
$i = $order[$j];
// Anything else remains the same

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...