From c7d99cbcb5ce7d810065ea4c6055e223348d4523 Mon Sep 17 00:00:00 2001 From: Sergey Yuhnevich Date: Fri, 2 Jun 2017 16:14:00 +0300 Subject: [PATCH] Add configuration for check button --- js/blanks.js | 3 ++- library.json | 2 +- semantics.json | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/js/blanks.js b/js/blanks.js index 879011d..2ff7c04 100644 --- a/js/blanks.js +++ b/js/blanks.js @@ -69,6 +69,7 @@ H5P.Blanks = (function ($, Question) { inputHasTipLabel: "Tip available", tipLabel: "Tip", behaviour: { + enableCheck: true, enableRetry: true, enableSolutionsButton: true, caseSensitive: true, @@ -163,7 +164,7 @@ H5P.Blanks = (function ($, Question) { Blanks.prototype.registerButtons = function () { var self = this; - if (!self.params.behaviour.autoCheck) { + if (self.params.behaviour.enableCheck && !self.params.behaviour.autoCheck) { // Check answer button self.addButton('check-answer', self.params.checkAnswer, function () { self.toggleButtonVisibility(STATE_CHECKING); diff --git a/library.json b/library.json index 8a419be..bb75e49 100644 --- a/library.json +++ b/library.json @@ -4,7 +4,7 @@ "machineName": "H5P.Blanks", "majorVersion": 1, "minorVersion": 7, - "patchVersion": 4, + "patchVersion": 5, "runnable": 1, "license": "MIT", "author": "Joubel", diff --git a/semantics.json b/semantics.json index ce5f18f..791878d 100644 --- a/semantics.json +++ b/semantics.json @@ -192,6 +192,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 + }, { "label": "Enable \"Retry\"", "importance": "low",