QS: Add option for removing 'Check'

Description

H5P.MultiChoice,
H5P.DragQuestion,
H5P.Blanks,
H5P.MarkTheWords,
H5P.DragText,
H5P.TrueFalse:

  • Add a new field in semantics in the behavior group. Name it enableCheckButton. Default on. Widget: "none", so that it is not shown in editor. We only want this feature through QS, not for standalone question types.

  • In constructor: give it a default value to true.

  • Add logic to not show button if enableCheck === false

  • Update translation files

H5P.QuestionSet

  • Add a new field in semantics in the override group. Name it checkButton, and make it into a boolean field. Default value is true.

  • See how showSolutionButton and retryButton are used, and add support for checkButton. Since this will be a boolean field, it shall always be set.

  • If checkbutton is off, remove settings for retry/showsolution in editor using the showWhen widget

  • Update translation files

  • No need for content upgrade

Remember that in QS you have the show solution and retry button on the last slide. You need to test these scenarios to be sure the check button doesn't show when in solution mode.

Acceptance Criteria

Question Set
1. Add option that removes the check button for all questions inside it ("Show Check buttons" in the editor)
2. For existing Question Sets the check button should be present (i.e. we don't wanna change existing content)
3. Default behavior when creating new QuestionSets should be that the check button is shown
4. Make sure the "check" button is not shown when clicking "show solution" and "retry" on The Question Set's summary page

When released, update https://h5p.org/node/19450

Status

Assignee

Andreas Nergaard

Reporter

Svein-Tore Griff With

Labels

None

Funding

None

Code reviewer

Pål Jørgensen

Released

None

Time tracking

10h

Sprint

None

Fix versions

Priority

High
Configure