From 4d35ce3c5c85b2f8526964967888565e712de3cb Mon Sep 17 00:00:00 2001 From: Sergey Yuhnevich Date: Fri, 2 Jun 2017 15:52:20 +0300 Subject: [PATCH] Add configuration for check button --- js/multichoice.js | 3 ++- library.json | 2 +- semantics.json | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/js/multichoice.js b/js/multichoice.js index 3dda4801..8101ec10 100644 --- a/js/multichoice.js +++ b/js/multichoice.js @@ -101,6 +101,7 @@ H5P.MultiChoice = function (options, contentId, contentData) { noInput: 'Input is required before viewing the solution' }, behaviour: { + enableCheck: true, enableRetry: true, enableSolutionsButton: true, type: 'auto', @@ -612,7 +613,7 @@ H5P.MultiChoice = function (options, contentId, contentData) { }, false); // Check solution button - if (!params.behaviour.autoCheck || !params.behaviour.singleAnswer) { + if (params.behaviour.enableCheck && (!params.behaviour.autoCheck || !params.behaviour.singleAnswer)) { self.addButton('check-answer', params.UI.checkAnswerButton, function () { self.answered = true; diff --git a/library.json b/library.json index 243680fb..c70358a9 100644 --- a/library.json +++ b/library.json @@ -3,7 +3,7 @@ "contentType": "Question", "majorVersion": 1, "minorVersion": 9, - "patchVersion": 3, + "patchVersion": 4, "runnable": 1, "machineName": "H5P.MultiChoice", "author": "Joubel", diff --git a/semantics.json b/semantics.json index c26b0566..3f9c4b4c 100644 --- a/semantics.json +++ b/semantics.json @@ -287,6 +287,14 @@ "description": "These options will let you control how the task behaves.", "optional": true, "fields": [ + { + "name": "enableCheck", + "type": "boolean", + "label": "Enable \"Check\" button", + "importance": "low", + "default": true, + "optional": true + }, { "name": "enableRetry", "type": "boolean",