[
  {
    "name": "scoreShow",
    "type": "text",
    "label": "Check answer button",
    "importance": "low",
    "default": "Check",
    "common": true
  },
  {
    "name": "tryAgain",
    "type": "text",
    "label": "Retry button",
    "importance": "low",
    "default": "Retry",
    "common": true,
    "optional": true
  },
  {
    "name": "correct",
    "type": "text",
    "label": "Correct solution label text",
    "importance": "low",
    "default": "Show solution",
    "common": true
  },
  {
    "label": "Feedback text",
    "importance": "low",
    "name": "feedback",
    "type": "text",
    "default": "You got @score of @total points",
    "description": "Feedback text, variables available: @score and @total. Example: 'You got @score of @total points.'",
    "common": true
  },
  {
    "label": "Score explanation text",
    "importance": "low",
    "name": "scoreExplanation",
    "type": "text",
    "default": "Correct answers give +1 point. Incorrect answers give -1 point. The lowest possible score is 0.",
    "common": true,
    "optional": true
  },
  {
    "name": "question",
    "importance": "high",
    "type": "group",
    "widget": "wizard",
    "fields": [
      {
        "name": "settings",
        "type": "group",
        "label": "Settings",
        "importance": "high",
        "fields": [
          {
            "name": "questionTitle",
            "type": "text",
            "label": "The title of this question",
            "importance": "high",
            "default": "Drag and Drop",
            "description": "Used in summaries, statistics etc."
          },
          {
            "name": "showTitle",
            "type": "boolean",
            "label": "Show Title",
            "importance": "low",
            "description": "Uncheck this option if you do not want this title to be displayed. The title will only be displayed in summaries, statistics etc.",
            "default": true
          },
          {
            "name": "background",
            "type": "image",
            "label": "Background image",
            "importance": "low",
            "optional": true,
            "description": "Optional. Select an image to use as background for your drag and drop task."
          },
          {
            "name": "size",
            "type": "group",
            "widget": "dimensions",
            "label": "Task size",
            "importance": "low",
            "description": "Specify how large (in px) the play area should be.",
            "default": {
              "width": 620,
              "height": 310,
              "field": "background"
            },
            "fields": [
              {
                "name": "width",
                "type": "number"
              },
              {
                "name": "height",
                "type": "number"
              }
            ]
          },
          {
            "name": "dropZoneHighlighting",
            "type": "select",
            "label": "Drop Zone Highlighting",
            "importance": "low",
            "description": "Choose when to highlight drop zones.",
            "default": "dragging",
            "options": [
              {
                "value": "dragging",
                "label": "When dragging"
              },
              {
                "value": "always",
                "label": "Always"
              },
              {
                "value": "never",
                "label": "Never"
              }
            ]
          },
          {
            "name": "autoAlignSpacing",
            "type": "number",
            "label": "Spacing for Auto-Align (in px)",
            "importance": "low",
            "min": 0,
            "default": 2,
            "optional": true
          }
        ]
      },
      {
        "name": "task",
        "type": "group",
        "widget": "dragQuestion",
        "label": "Task",
        "importance": "high",
        "description": "Start by placing your drop zones.<br/>Next, place your droppable elements and check off the appropriate drop zones.<br/>Last, edit your drop zone again and check off the correct answers.",
        "fields": [
          {
            "name": "elements",
            "type": "list",
            "label": "Elements",
            "importance": "high",
            "entity": "element",
            "field": {
              "type": "group",
              "label": "Element",
              "importance": "high",
              "fields": [
                {
                  "name": "type",
                  "type": "library",
                  "description": "Choose the type of content you would like to add.",
                  "importance": "medium",
                  "options": [
                    "H5P.AdvancedText 1.1",
                    "H5P.Image 1.0"
                  ]
                },
                {
                  "name": "x",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "y",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "height",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "width",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "dropZones",
                  "type": "select",
                  "widget": "dynamicCheckboxes",
                  "label": "Select drop zones",
                  "importance": "high",
                  "multiple": true
                },
                {
                  "name": "backgroundOpacity",
                  "type": "number",
                  "label": "Background Opacity",
                  "importance": "low",
                  "min": 0,
                  "max": 100,
                  "step": 5,
                  "default": 100,
                  "optional": true
                },
                {
                  "name": "multiple",
                  "type": "boolean",
                  "label": "Infinite number of element instances",
                  "importance": "low",
                  "description": "Clones this element so that it can be dragged to multiple drop zones.",
                  "default": false
                }
              ]
            }
          },
          {
            "name": "dropZones",
            "type": "list",
            "label": "Drop Zones",
            "importance": "high",
            "entity": "Drop Zone",
            "field": {
              "type": "group",
              "label": "Drop Zone",
              "importance": "high",
              "fields": [
                {
                  "name": "label",
                  "type": "text",
                  "widget": "html",
                  "label": "Label",
                  "importance": "medium",
                  "enterMode": "div",
                  "tags": [
                    "strong",
                    "em",
                    "del"
                  ]
                },
                {
                  "name": "showLabel",
                  "type": "boolean",
                  "label": "Show label",
                  "importance": "low"
                },
                {
                  "name": "x",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "y",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "height",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "width",
                  "type": "number",
                  "widget": "none"
                },
                {
                  "name": "correctElements",
                  "type": "select",
                  "widget": "dynamicCheckboxes",
                  "label": "Select correct elements",
                  "importance": "low",
                  "multiple": true
                },
                {
                  "name": "backgroundOpacity",
                  "type": "number",
                  "label": "Background Opacity",
                  "importance": "low",
                  "min": 0,
                  "max": 100,
                  "step": 5,
                  "default": 100,
                  "optional": true
                },
                {
                  "name": "tip",
                  "type": "group",
                  "label": "Tip",
                  "importance": "low",
                  "optional": true,
                  "fields": [
                    {
                      "name": "tip",
                      "label": "Tip text",
                      "importance": "low",
                      "type": "text",
                      "widget": "html",
                      "tags": [
                        "p",
                        "br",
                        "strong",
                        "em"
                      ],
                      "optional": true
                    }
                  ]
                },
                {
                  "name": "single",
                  "type": "boolean",
                  "label": "This drop zone can only contain one element",
                  "description": "Make sure there is only one correct answer for this dropzone",
                  "importance": "low",
                  "default": false
                },
                {
                  "name": "autoAlign",
                  "type": "boolean",
                  "label": "Enable Auto-Align",
                  "importance": "low",
                  "description": "Will auto-align all draggables dropped in this zone."
                }
              ]
            }
          }
        ]
      }
    ]
  },
  {
    "name": "backgroundOpacity",
    "type": "text",
    "label": "Background opacity for draggables",
    "importance": "low",
    "description": "If this field is set, it will override opacity set on all draggable elements. This should be a number between 0 and 100, where 0 means full transparency and 100 means no transparency",
    "optional": true
  },
  {
    "name": "behaviour",
    "type": "group",
    "label": "Behavioural settings",
    "importance": "low",
    "description": "These options will let you control how the task behaves.",
    "optional": true,
    "fields": [
      {
        "name": "enableRetry",
        "type": "boolean",
        "label": "Enable \"Retry\"",
        "importance": "low",
        "default": true
      },
      {
        "label": "Require user input before the solution can be viewed",
        "importance": "low",
        "name": "showSolutionsRequiresInput",
        "type": "boolean",
        "default": true
      },
      {
        "name": "singlePoint",
        "type": "boolean",
        "label": "Give one point for the whole task",
        "importance": "low",
        "description": "Disable to give one point for each draggable that is placed correctly.",
        "default": true
      },
      {
        "label": "Apply penalties",
        "name": "applyPenalties",
        "type": "boolean",
        "description": "Apply penalties for elements dropped in the wrong drop zones. This must be enabled when the same element(s) are able to be dropped into multiple drop zones, or if there is only one drop-zone. If this is not enabled, learners may match all items to all drop-zones and always receive a full score.",
        "default": true
      },
      {
        "name": "enableScoreExplanation",
        "type": "boolean",
        "label": "Enable score explanation",
        "description": "Display a score explanation to user when checking their answers (if the 'Apply penalties' option has been selected).",
        "importance": "low",
        "default": true,
        "optional": true
      }
    ]
  }
]
