ACME Likert Scale Plugin Demo

Demonstrates custom <likertChoice> element handling with priority-based extraction

Select Example

Item Preview

Loading...

Interaction Info

Interactions Found: 0
Types: None

QTI XML Source

View XML Source
<?xml version="1.0" encoding="UTF-8"?>
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
                identifier="likert-5pt-agreement"
                title="5-Point Agreement Scale">
  <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
    <correctResponse>
      <value>agree</value>
    </correctResponse>
  </responseDeclaration>

  <itemBody>
    <h2>Learning Confidence Assessment</h2>
    <p>Please indicate your level of agreement with the following statement:</p>
    <blockquote style="font-style: italic; margin: 1rem 0; padding: 1rem; background: #f5f5f5; border-left: 4px solid #0066cc;">
      "I feel confident in my understanding of QTI 2.2 assessment items."
    </blockquote>

    <choiceInteraction responseIdentifier="RESPONSE" maxChoices="1">
      <prompt>Rate your agreement:</prompt>
      <likertChoice identifier="strongly_disagree">Strongly Disagree</likertChoice>
      <likertChoice identifier="disagree">Disagree</likertChoice>
      <likertChoice identifier="neutral">Neutral</likertChoice>
      <likertChoice identifier="agree">Agree</likertChoice>
      <likertChoice identifier="strongly_agree">Strongly Agree</likertChoice>
    </choiceInteraction>
  </itemBody>
</assessmentItem>

✓ Plugin Registered

The ACME Likert Scale Plugin has been successfully registered with priority 500.

When the Player parses QTI XML containing <likertChoice> elements, the Likert extractor will take precedence over the standard choice extractor.

Likert Choice Elements

✓ This item contains <likertChoice> elements

The Likert extractor will:

  • Detect the scale type (agreement, frequency, satisfaction, etc.)
  • Extract choice metadata (scale points, likert index)
  • Prevent shuffling (Likert scales must maintain order)
  • Generate default labels for empty choices

How It Works

1. Custom Element Detection: The extractor's canHandle() method checks for <likertChoice> children

2. Priority-Based Dispatch: Vendor-specific extractor (priority 500) takes precedence over standard extractor (priority 10)

3. Type Detection: Automatically detects 6 scale types (agreement, frequency, satisfaction, quality, importance, likelihood) based on text patterns

4. Default Labels: Generates appropriate labels for 3, 4, 5, and 7-point scales when <likertChoice> elements are empty

5. Validation: Ensures 2-7 scale points, no shuffling, and single selection (maxChoices=1)