# Question Set (H5P.QuestionSet)

A quiz: questions one after another, then a result page with the score.

- Each item of `questions` is sub-content: `{ "library": "H5P.MultiChoice", "params": { … }, "metadata": { "title": "…" } }`. Write each question's `params` from its own type file. The result page lists questions by `metadata.title`; without one a question is "Question 2" in the content's language.
- `passPercentage` is the pass mark; `endGame.overallFeedback` holds the score ranges' messages. Question Set 1.21 draws neither on its result page, an H5P bug (h5p/h5p-question-set#183): screen readers announce the message, and a learner sees only the score. Tell the user.
- An intro screen: `introPage.showIntroPage: true`, with `title` and `introduction`.
- `randomQuestions` shuffles them; `poolSize` draws that many from the list each time.
- Its navigation and result screen ("Previous", "Next", "Results", "Score") are English in all but one or two of its 48 translations; the build lists what stayed English.

## Example

```json
{
  "type": "H5P.QuestionSet",
  "params": {
    "passPercentage": 50,
    "questions": [
      {
        "library": "H5P.MultiChoice",
        "metadata": { "title": "The longest river" },
        "params": {
          "question": "Which river is the longest in Europe?",
          "answers": [
            { "text": "Volga", "correct": true },
            { "text": "Danube", "correct": false }
          ]
        }
      },
      {
        "library": "H5P.TrueFalse",
        "metadata": { "title": "The Rhine" },
        "params": { "question": "The Rhine flows into the North Sea.", "correct": "true" }
      }
    ],
    "endGame": {
      "overallFeedback": [
        { "from": 0, "to": 49, "feedback": "Not yet: read about the rivers again, then retry." },
        { "from": 50, "to": 100, "feedback": "Passed." }
      ]
    }
  }
}
```

<!-- Generated by `h5p-author schema --markdown` from the pinned pack. Do not edit by hand. -->

## Fields of H5P.QuestionSet 1.21

The example is `type` and `params` alone, and `params` holds the fields below. A source also names its own `title`, `language`, `license` and `authors`, all four required: the build refuses a source that leaves out any of them. The author's name and the licence are the user's: ask for what they have not given. For a name they skip, write the one you know them by, or "Unknown"; for a licence they skip, `U`.

- `introPage` group — Quiz introduction
  - `showIntroPage` boolean — Display introduction
  - `title` text — Title: This title will be displayed above the introduction text.
  - `introduction` html: sub sup strong em code — Introduction text: This text will be displayed before the quiz starts.
  - `startButtonText` text = "Start Quiz" — Start button text
  - `backgroundImage` image file — Cover image
  - `backgroundImageAltText` text — Alternative text: If the browser can't load the image this text will be displayed instead. Also used by "text-to-speech" readers.
- `progressType` one of "textual" | "dots" = "dots" — Progress indicator: Question set progress indicator style. Will be Textual if backwards navigation is disabled.
- `passPercentage` whole number 0–100 = 50 — Pass percentage: Percentage of Total score required for passing the quiz.
- `questions` list 1+ of sub-content: H5P.MultiChoice | H5P.DragQuestion | H5P.Blanks | H5P.MarkTheWords | H5P.DragText | H5P.TrueFalse | H5P.Essay | H5P.MultiMediaChoice, required — Questions: Library for this question.
- `disableBackwardsNavigation` boolean = false — Disable backwards navigation
- `randomQuestions` boolean = false — Randomize questions
- `poolSize` whole number 1– — Number of questions to be shown:: Create a randomized batch of questions from the total.
- `endGame` group — Quiz finished
  - `showResultPage` boolean = true — Display results
  - `showSolutionButton` boolean = true — Display solution button
  - `showRetryButton` boolean = true — Display retry button
  - `noResultMessage` text = "Finished" — No results message: Text displayed on end page when "Display results" is disabled
  - `message` text = "Results" — Results heading: This heading will be displayed at the end of the quiz when the user has answered all questions.
  - `amountCorrect` text = "@finals of @totals correct" — Amount correct heading: Header to show the final score to the user on the end screen
  - `scoreBarLabel` text = "You got @finals out of @totals points" — Score announcer: This label will be used for announcing the final score to the user on the end screen
  - `scoreHeader` text = "Score" — Score heading: Header for the score part of the results table
  - `overallFeedback` list 1+ of — Overall Feedback: Click the "Add range" button to add as many ranges as you need. Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!
    - `from` whole number 0–100 = 0 — Score Range
    - `to` whole number 0–100 = 100
    - `feedback` text — Feedback for defined score range
  - `oldFeedback` group — Old Feedback
    - `successGreeting` text — Quiz passed greeting: This text will be displayed above the score if the user has successfully passed the quiz.
    - `successComment` html: sub sup strong em a code — Passed comment: This comment will be displayed after the score if the user has successfully passed the quiz.
    - `failGreeting` text — Quiz failed title: This text will be displayed above the score if the user has failed the quiz.
    - `failComment` html: sub sup strong em a code — Failed comment: This comment will be displayed after the score if the user has failed the quiz.
  - `solutionButtonText` text = "Show solution" — Solution button label: Text for the solution button.
  - `retryButtonText` text = "Retry" — Retry button label: Text for the retry button.
  - `finishButtonText` text = "Finish" — Finish button text
  - `submitButtonText` text = "Submit" — Submit button text
  - `showAnimations` boolean — Display video before quiz results
  - `skippable` boolean — Enable skip video button
  - `skipButtonText` text = "Skip video" — Skip video button label
  - `successVideo` video files — Passed video
  - `failVideo` video files — Fail video
- `override` group — Behavioural settings
  - `checkButton` boolean = true — Show "Check" buttons
  - `showSolutionButton` one of "on" | "off"; only when checkButton is true — Override "Show Solution" button: This option determines if the "Show Solution" button will be shown for all questions, disabled for all or configured for each question individually.
  - `retryButton` one of "on" | "off"; only when checkButton is true — Override "Retry" button: This option determines if the "Retry" button will be shown for all questions, disabled for all or configured for each question individually.
  - `backgroundImage` image file — Background image

16 interface texts are left out: they come from the libraries' translations. `h5p-author schema H5P.QuestionSet --all` lists them, for a source to set one.

<!-- End of the generated section. -->
