1

I'm making a Qualification Test with a multi-answer checkbox question.

<AnswerSpecification>
  <SelectionAnswer>
    <StyleSuggestion>checkbox</StyleSuggestion>
    <Selections>
      <Selection>
        <SelectionIdentifier>grammar</SelectionIdentifier>
        <Text>Bad grammar.</Text>
      </Selection>
      <Selection>
        <SelectionIdentifier>spelling</SelectionIdentifier>
        <Text>Bad spelling</Text>
      </Selection>
      <Selection>
        <SelectionIdentifier>punctuation</SelectionIdentifier>
        <Text>Bad punctuation</Text>
      </Selection>
      ...
    </Selections>
  </SelectionAnswer>
</AnswerSpecification>

The question shows up fine, however, the AnswerKey.xml validates, but does not work correctly.

<Question>
 <QuestionIdentifier>my_question_id</QuestionIdentifier>
 <AnswerOption>
   <SelectionIdentifier>grammar</SelectionIdentifier>
   <AnswerScore>5</AnswerScore>
 </AnswerOption>
 <AnswerOption>
   <SelectionIdentifier>punctuation</SelectionIdentifier>
   <AnswerScore>5</AnswerScore>
 </AnswerOption>
</Question>

If the worker selects both "grammar" and "punctuation", the final score should be 10, but it comes out to zero.

Anyone else have this problem?

Thanks,

Linda

Linda
  • 143
  • 1
  • 7

2 Answers2

2

I think you have to specify both answers together as a third response pattern:

<Question>
 <QuestionIdentifier>my_question_id</QuestionIdentifier>
 <AnswerOption>
   <SelectionIdentifier>grammar</SelectionIdentifier>
   <AnswerScore>5</AnswerScore>
 </AnswerOption>
 <AnswerOption>
   <SelectionIdentifier>punctuation</SelectionIdentifier>
   <AnswerScore>5</AnswerScore>
 </AnswerOption>
 <AnswerOption>
   <SelectionIdentifier>grammar</SelectionIdentifier>
   <SelectionIdentifier>punctuation</SelectionIdentifier>
   <AnswerScore>10</AnswerScore>
 </AnswerOption>
</Question>
Thomas
  • 43,637
  • 12
  • 109
  • 140
  • This is amazing. How did you know it is possible to specify multiple SelectionIdentifier per AnswerOption? I was wasting half a day trying to find the way to grant scores for 4-out-of-8 options! – ishahak Jul 29 '20 at 07:01
0

Alternatively, you could also make each checkbox option it's own unique "question", and then you don't have to worry about specifying every possible permutation.