{
  "$id": "mcq_multiple_select.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Multiple Choice Question - Multiple Select",
  "description": "Learnosity MCQ with multiple selection, reusing the common base schema",
  "$ref": "learnosity-question-base.schema.json",
  "type": "object",
  "required": ["stimulus", "options", "multiple_responses", "ui_style", "is_math", "min_selection", "max_selection", "feedback_attempts"],
  "properties": {
    "type": {
      "const": "mcq",
      "description": "Question type identifier for multiple select MCQ"
    },
    "multiple_responses": {
      "type": "boolean",
      "const": true,
      "description": "Must be true for multiple select questions"
    },
    "stimulus": {
      "type": "string",
      "description": "The question text (can include HTML)"
    },
    "options": {
      "type": "array",
      "description": "Array of answer choices",
      "minItems": 2,
      "items": {
        "type": "object",
        "required": ["label", "value"],
        "properties": {
          "label": {
            "type": "string",
            "description": "Text shown to student (can include HTML)"
          },
          "value": {
            "type": "string",
            "description": "Unique ID for this option"
          }
        },
        "additionalProperties": true
      }
    },
    "min_selection": {
      "type": "integer",
      "minimum": 1,
      "description": "Minimum number of selections required"
    },
    "max_selection": {
      "type": "integer",
      "minimum": 1,
      "description": "Maximum number of selections allowed"
    },
    "ui_style": {
      "allOf": [
        { "$ref": "ui_style.schema.json" },
        { "required": ["type", "orientation", "validation_stem_numeration"] }
      ]
    },
    "is_math": {
      "type": "boolean",
      "description": "Whether this question contains mathematical content"
    },
    "feedback_attempts": {
      "type": ["integer", "string"],
      "description": "Number of attempts before showing feedback"
    }
  }
}

