diff --git a/js/questionset.js b/js/questionset.js index 1413ab7..4e3aba4 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -225,20 +225,21 @@ H5P.QuestionSet = function (options, contentId, contentData) { var $template = $(template.render(params)); // Set overrides for questions - var override; - if (params.override.showSolutionButton || params.override.retryButton) { - override = {}; - if (params.override.showSolutionButton) { - // Force "Show solution" button to be on or off for all interactions - override.enableSolutionsButton = - (params.override.showSolutionButton === 'on' ? true : false); - } + var override = {}; - if (params.override.retryButton) { - // Force "Retry" button to be on or off for all interactions - override.enableRetry = - (params.override.retryButton === 'on' ? true : false); - } + if (params.override.checkButton) { + // Force "Check" button to be on or off for all interactions + override.enableCheck = params.override.checkButton === 'on'; + } + + if (params.override.showSolutionButton) { + // Force "Show solution" button to be on or off for all interactions + override.enableSolutionsButton = params.override.showSolutionButton === 'on'; + } + + if (params.override.retryButton) { + // Force "Retry" button to be on or off for all interactions + override.enableRetry = params.override.retryButton === 'on'; } /** diff --git a/library.json b/library.json index 3fb82a0..64c1f66 100644 --- a/library.json +++ b/library.json @@ -4,7 +4,7 @@ "contentType": "question", "majorVersion": 1, "minorVersion": 13, - "patchVersion": 0, + "patchVersion": 1, "embedTypes": [ "iframe" ], @@ -61,4 +61,4 @@ "minorVersion": 2 } ] -} \ No newline at end of file +} diff --git a/semantics.json b/semantics.json index 7268972..db3fabd 100644 --- a/semantics.json +++ b/semantics.json @@ -418,10 +418,28 @@ { "name": "override", "type": "group", - "label": "Settings for \"Show solution\" and \"Retry\" buttons", + "label": "Override settings for \"Check\", \"Show solution\" and \"Retry\" buttons", "importance": "low", "optional": true, "fields": [ + { + "name": "checkButton", + "type": "select", + "label": "Override \"Check\" button", + "importance": "low", + "description": "This option determines if the \"Check\" button will be shown for all questions, disabled for all or configured for each question individually.", + "optional": true, + "options": [ + { + "value": "on", + "label": "Enabled" + }, + { + "value": "off", + "label": "Disabled" + } + ] + }, { "name": "showSolutionButton", "type": "select", @@ -460,4 +478,4 @@ } ] } -] \ No newline at end of file +]