There are 10 multiple choice questions with 9 items each, but for some of the items within each question it is correct to click/select them, for others to not click them.
So this needs to be defined before calculating the score.
Then, the error percentage should be calculated by dividing the sum of the wrong choices on all items by the sum of the items in the questions that were answered. Some of the questions are on pages that will not be displayed if participants are too slow (there is a time limit across all 10 questions), so these are the not answered questions.
The code so far is:
if (value('D208_03') == 1) {
$ergebnisD2Z1B1 = 0;
} elseif (value('D208_03') == 2) {
$ergebnisD2Z1B1 = 1;
This is repeated for each item in each question, then summed up and divided by the total number of items.
But how do I do this when some of the questions might not be answered?